The new enum values (added to Blink and Pepper) will be handled
properly by the PDF plugin, but we want to avoid passing it to any
other plugins, notably Flash. Accordingly, a previous CL [1] exposed
to the UI whether the content being printed is a PDF to prevent the
new scaling option for Flash. Additionally, this CL adds a check in
PepperPluginInstanceImpl::PrintBegin() to avoid sending the new enum
to a non-PDF plugin.
A future CL will implement the functionality of "fit to paper" scaling
and another will add an option to the UI.
[1] https://chromium-review.googlesource.com/c/chromium/src/+/1788484
Bug: 989978
Change-Id: I91e821f8d04d1da0fb718b71fb7f331e45dfed07
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1780961
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Daniel Hosseinian <dhoss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698031}
This change adds two new cursors for auto scrolling, one that shows only
vertical directions, and the other that shows only horizontal. (This has
the unfortunate side effect of causing cascading small changes to many
files, sorry!) These new cursors are then used in autoscrolling so that
when a user is on a page that can only scroll vertically, if they middle
click it will then show an autoscroll cursor that reflects the available
directions, i.e. up and down only. Similar results for horizontal
scrolling only pages.
This change caches the directions available to scroll when the middle
mouse button is clicked and uses those to determine which cursors to show
when handling mouse move events. This unfortunately means that if a user
middle clicks somewhere that can only scroll vertically, and later that
changes to being able to scroll horizontally exclusively without user
input, the cursor will still only show vertical directions. However, this
matches what Firefox and non-Chromium-based Edge do right now, so this
seems fine to me. A file up bug to fix this issue should be filed though.
Bug: 11437
Change-Id: I68e083d1e0b9e14071f67f9268e826a40cebd783
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638924
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Mario Bianucci <mabian@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#666361}
PPAPI is deprecated and is not really changed at this point. Rubberstamps from eng review isn't needed.
Change-Id: Ie92d7b576e45b53f8d50d6114b956c49899e0d75
Reviewed-on: https://chromium-review.googlesource.com/c/1269355
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597666}
Those can only be used by the old Hangouts effect plugin and it isn't
used anymore.
Since those APIs depend on URL.createObjectURL(MediaStream) which is
deprecated, it is necessary to first remove them from the codebase
in order to continue removing URL.createObjectURL(MediaStream).
Bug: 852412
Change-Id: If64e8e7259a6d51ccf89362b59c9d6fc7c890a30
Reviewed-on: https://chromium-review.googlesource.com/1099159
Commit-Queue: Florent Castelli <orphis@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588819}
The use counter is showing pretty much zero usage of this API, so as a
first step towards removing the implementation of DownloadToFile, this
changes the exposed API to always fail when attempting to use it.
Bug: 823522
Change-Id: Ic82280d3d203684467fa4845b255cff9a02e1e12
Reviewed-on: https://chromium-review.googlesource.com/1062705
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561682}
PPP_Printing_Dev_0_6 uses struct PP_PrintSettings_Dev in its Begin
method. r554188 changed the struct to add a new field, and another
pending CL wants to add one more field. These changes may not be safe
because Flash also uses PPP_Printing_Dev_0_6.
To resolve this issue, revert the PP_PrintSettings_Dev changes. In its
place, add a separate struct PP_PdfPrintSettings_Dev, and a separate
PrintBegin method to PPP_Pdf_1_1. When printing, if PPP_Pdf is
available, use its PrintBegin method. Otherwise, use PPP_Printing_Dev's
Begin method.
BUG=775999,835654
Change-Id: Ia489668c301e28eb943270fd1d7e268ede6300c5
Reviewed-on: https://chromium-review.googlesource.com/1065015
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560658}
In printing, 2-up, 3-up, or more generally N-up refers to a page
layout strategy in which multiple pages are composited onto a
single page.
1. Added ability to pass the N-up feature UI settings(which will be
added in the next CL) to the print preview workflow, so that the
PDF plugin can take action based on user's input.
2. Added N-up feature support to pdfium_engine, so that when the
source is PDF, pdf plugin will generate the N-up output doc based
on user's input.
These changes have been reviewed in:
https://chromium-review.googlesource.com/c/chromium/src/+/1014628.
Bug: 775999
Change-Id: I552c9c91e32af0faa6ffaa8c42ac0652f470f791
Reviewed-on: https://chromium-review.googlesource.com/1028992
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Shirleen Lou <xlou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554188}
This reverts commit 008759aa5b.
Reason for revert: Breaks MSan Tests
Findit (https://goo.gl/kROfz5) confirmed this CL at revision 553428 as the culprit for
failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzAwODc1OWFhNWJjOGNkMDVjNTI5NjkwOGVmYmY3NGRjYjA0M2Q2NmUM
Example:
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.memory%2FLinux_ChromiumOS_MSan_Tests%2F6869%2F%2B%2Frecipes%2Fsteps%2Fmus_browser_tests%2F0%2Flogs%2FOutOfProcessPPAPITest.Printing%2F0
Uninitialized bytes in __msan_check_mem_is_initialized at offset 0 inside [0x7f914c1f9524, 4)
==9854==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x12c35d8e in WriteBytesCommon ./../../base/pickle.cc:430:3
#1 0x12c35d8e in void base::Pickle::WriteBytesStatic<4ul>(void const*) ./../../base/pickle.cc:395:0
#2 0xb00ffa1 in WritePOD<int> ./../../base/pickle.h:327:5
#3 0xb00ffa1 in WriteInt ./../../base/pickle.h:190:0
#4 0xb00ffa1 in Write ./../../ipc/ipc_message_utils.h:186:0
#5 0xb00ffa1 in WriteParam<unsigned int> ./../../ipc/ipc_message_utils.h:110:0
#6 0xb00ffa1 in IPC::ParamTraits<PP_PrintSettings_Dev>::Write(base::Pickle*, PP_PrintSettings_Dev const&) ./../../ppapi/proxy/ppapi_messages.h:223:0
#7 0xd1e82ee in MessageT<true, false> ./../../ipc/ipc_message_templates.h:124:33
...
Uninitialized value was stored to memory at
#0 0xb010122 in IPC::ParamTraits<PP_PrintSettings_Dev>::Write(base::Pickle*, PP_PrintSettings_Dev const&) ./../../ppapi/proxy/ppapi_messages.h:0:1
#1 0xd1e82ee in MessageT<true, false> ./../../ipc/ipc_message_templates.h:124:33
#2 0xd1e82ee in content::PepperPrintingHost::PrintSettingsCallback(ppapi::host::ReplyMessageContext, std::__1::pair<PP_PrintSettings_Dev, int>) ./../../content/browser/renderer_host/pepper/pepper_printing_host.cc:55:0
#3 0xd1e87e2 in Invoke<const base::WeakPtr<content::PepperPrintingHost> &, const ppapi::host::ReplyMessageContext &, std::__1::pair<PP_PrintSettings_Dev, int> > ./../../base/bind_internal.h:447:12
#4 0xd1e87e2 in MakeItSo<void (content::PepperPrintingHost::*const &)(ppapi::host::ReplyMessageContext, std::__1::pair<PP_PrintSettings_Dev, int>), const base::WeakPtr<content::PepperPrintingHost> &, const ppapi::host::ReplyMessageContext &, std::__1::pair<PP_PrintSettings_Dev, int> > ./../../base/bind_internal.h:550:0
#5 0xd1e87e2 in RunImpl<void (content::PepperPrintingHost::*const &)(ppapi::host::ReplyMessageContext, std::__1::pair<PP_PrintSettings_Dev, int>), const std::__1::tuple<base::WeakPtr<content::PepperPrintingHost>, ppapi::host::ReplyMessageContext> &, 0, 1> ./../../base/bind_internal.h:604:0
#6 0xd1e87e2 in base::internal::Invoker<base::internal::BindState<void (content::PepperPrintingHost::*)(ppapi::host::ReplyMessageContext, std::__1::pair<PP_PrintSettings_Dev, int>), base::WeakPtr<content::PepperPrintingHost>, ppapi::host::ReplyMessageContext>, void (std::__1::pair<PP_PrintSettings_Dev, int>)>::Run(base::internal::BindStateBase*, std::__1::pair<PP_PrintSettings_Dev, int>&&) ./../../base/bind_internal.h:586:0
#7 0xd1e7292 in Run ./../../base/callback.h:96:12
...
Original change's description:
> Add N-up feature support to pdfium_engine.
>
> In printing, 2-up, 3-up, or more generally N-up refers to a page
> layout strategy in which multiple pages are composited onto a
> single page.
>
> 1. Added ability to pass the N-up feature UI settings (which will be
> added in the next CL) to the print preview workflow, so that the
> PDF plugin can take action based on user's input.
> 2. Added N-up feature support to pdfium_engine, so that when the
> source is PDF, pdf plugin will generate the N-up output doc based
> on user's input.
>
> Bug: 775999
> Change-Id: I27933d1a7da65376e70bdcb538393bb8bb3ec688
> Reviewed-on: https://chromium-review.googlesource.com/1014628
> Commit-Queue: Shirleen Lou <xlou@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Sean Kau <skau@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#553428}
TBR=raymes@chromium.org,palmer@chromium.org,dcheng@chromium.org,thestig@chromium.org,skau@chromium.org,jochen@chromium.org,xlou@chromium.org
Change-Id: I017a6dd2527c843ebb365bf5ec2da19696860898
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 775999
Reviewed-on: https://chromium-review.googlesource.com/1027770
Reviewed-by: Henrik Boström <hbos@chromium.org>
Commit-Queue: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553507}
In printing, 2-up, 3-up, or more generally N-up refers to a page
layout strategy in which multiple pages are composited onto a
single page.
1. Added ability to pass the N-up feature UI settings (which will be
added in the next CL) to the print preview workflow, so that the
PDF plugin can take action based on user's input.
2. Added N-up feature support to pdfium_engine, so that when the
source is PDF, pdf plugin will generate the N-up output doc based
on user's input.
Bug: 775999
Change-Id: I27933d1a7da65376e70bdcb538393bb8bb3ec688
Reviewed-on: https://chromium-review.googlesource.com/1014628
Commit-Queue: Shirleen Lou <xlou@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Sean Kau <skau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553428}
Create a PDF permission for APIs specific to the PDF plugin. Also remove
PERMISSION_PRIVATE from PDF as it does not need most of those APIs. One
exception is the PPB_URLLoader_Trusted API for which we move permission
checking to happen inside ppb_url_loader.cc.
Bug: 821266
Change-Id: I5f174d1fd2bff6fb7475956d9b9c772474648515
Reviewed-on: https://chromium-review.googlesource.com/967907
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546345}
This reverts commit 195e051e1e.
Original description:
Adds code to compute Storage Id for encrypted media. It uses a new profile
setting ("media.storage_id_salt"). On Chromium this is not supported, so the
empty string is returned. Chrome implementation pending.
BUG=478960
TEST=Failing tests pass locally
Change-Id: I8ccd65ff839a43fe3966f8e85b51ce326b3ffd95
Reviewed-on: https://chromium-review.googlesource.com/646431
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499804}
Adds code to compute Storage Id for encrypted media. It uses a new profile
setting ("media.storage_id_salt"). On Chromium this is not supported, so the
empty string is returned. Chrome implementation pending.
BUG=478960
TEST=StorageId browser_tests pass
Change-Id: I566e1cfbd1d44a2be809dd51c8418b922126cccc
Reviewed-on: https://chromium-review.googlesource.com/587828
Reviewed-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498600}
Currently there are only 4 EME exceptions reported to users (TypeError,
NotSupportedError, InvalidStateError, and QuotaExceededError). Internally the
code was using InvalidAccessError as TypeError, so rename it to match what
users see. The other 3 errors (UnknownError, ClientError, and OutputError)
are not used, and are removed.
This change also makes CdmPromise::Exception an enum class.
BUG=570216
TEST=EME browser_tests still pass
Change-Id: Ib0a3970651332866b10b233d36bd880d996660af
Reviewed-on: https://chromium-review.googlesource.com/537592
Reviewed-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494586}
- Update PpapiDecryptor et al to support GetStatusForPolicy().
- Update PPP_CONTENT_DECRYPTOR_PRIVATE interface to support
GetStatusForPolicy().
- Update PPB_CONTENT_DECRYPTOR_PRIVATE interface to support
PromiseResolvedWithKeyStatus().
- Add PolicyCheck browser test.
In future CLs:
- GetStatusForPolicy() will also be supported in mojo CDM.
- Widevine CDM will be updated to support GetStatusForPolicy().
BUG=709348
TEST=New tests added
Change-Id: Ida71224a60bd4cbf9a37b9613c2fd84acb878f60
Reviewed-on: https://chromium-review.googlesource.com/576152
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: John Rummell <jrummell@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489077}
In order to enable offline licenses, the CDM needs a Storage ID that will be
used to encrypt the license files saved. The CL updates the Platform
Verification Pepper API to add the messages to retrieve the Storage ID from
the browser process.
Actual implementation of the Storage ID value in progress.
BUG=478960
TEST=new browser_test passes
Change-Id: I27250418b298a3bd071c7b8c3f6dc2d150d35b77
Reviewed-on: https://chromium-review.googlesource.com/531915
Commit-Queue: John Rummell <jrummell@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485745}
This patch adds tilt_x and tilt_y fields to pp_touch_point.
BUG=715289
TEST=
Review-Url: https://codereview.chromium.org/2890323002
Cr-Commit-Position: refs/heads/master@{#474977}
This patch route coalesced events through webplugin interface. The
coalesced touch events will be dispatched to nacl when client request
PP_INPUTEVENT_CLASS_COALESCED_TOUCH.
BUG=720529
Review-Url: https://codereview.chromium.org/2844823002
Cr-Commit-Position: refs/heads/master@{#471909}
- Keep the current |PPB_Audio| interface unchanged
- Add a new dev interface: |PPB_AudioOutput_Dev|
- Implement |PPB_AudioOutput_Dev| using the typical HostResource
implementations like |PPB_AudioInput_Dev|
- Add ppapi/proxy/audio_output_resource.h/cc etc. to implement
|AudioOutputResource|
- Add content/renderer/pepper/pepper_audio_output_host.h/cc etc.
to implement |PepperAudioOutputHost|
- Keep ppb_audio_proxy.h/cc, ppb_audio_shared.h/cc, ppb_audio_impl.h/cc
unchanged, so that the current |PPB_Audio| will not be affected.
- Modify content/renderer/pepper/pepper_platform_audio_output.h/cc to
accept both |AudioHelper| and |PepperAudioOutputHost| clients
- The way to implement |PepperAudioOutputHost| is borrowed from
"media/audio/audio_output_device.cc" where audio output selection isi
supported for javascript.
- Add necessary IPC message definitions for |PPB_AudioOutput_Dev|
BUG=701584
R= bbudge@chromium.org, tsepez@chromium.org, isherman@chromium.org
Review-Url: https://codereview.chromium.org/2755613002
Cr-Commit-Position: refs/heads/master@{#462889}
The specified maximum value doesn't allow PP_CDMKEYSTATUS_RELEASED,
so update it.
BUG=666975
TEST=Tested with W3C EME tests
Review-Url: https://codereview.chromium.org/2514123004
Cr-Commit-Position: refs/heads/master@{#433754}
MediaStreamTrack.getSources is scheduled for removal in M56.
BUG=388194
Review-Url: https://codereview.chromium.org/2474673002
Cr-Commit-Position: refs/heads/master@{#429361}
We should just use int8_t or uint8_t instead of char in the IDL.
BUG=255715
Review-Url: https://codereview.chromium.org/2394773002
Cr-Commit-Position: refs/heads/master@{#423524}
WebInputEvents. The eraser is added as a PointerType in
WebPointerProperties, which is also shared with PlatformInputEvents.
To add support for this pointer type in the PPAPI we will be adding
a new modifier flag, since the PPAPI does not have a concept of
pointer tool types.
BUG=636458
TEST=none
Review-Url: https://codereview.chromium.org/2289273002
Cr-Commit-Position: refs/heads/master@{#416141}
SetLayerTransform() sets a transformation factor that will be applied for the current
layer displayed on the output device.
This function has no effect until you call Flush().
@param[in] scale The scale to be applied.
@param[in] origin The origin of the scale.
@param[in] translate The translation to be applied.
@return Returns true on success or false if the resource is invalid or the scale factor is 0 or less.
BUG=605379
NOPRESUBMIT=true
Reason:
** Presubmit ERRORS **
TODOs found in stable public PPAPI files:
ppapi/cpp/graphics_2d.h
Review URL: https://codereview.chromium.org/1881603002
Cr-Commit-Position: refs/heads/master@{#388851}
The first attempt in r357449 resulted in a partial revert in r357968.
This reverts r357968, so effectively this lands all of r357449.
BUG=551093
Review URL: https://codereview.chromium.org/1692623006
Cr-Commit-Position: refs/heads/master@{#383660}
Part 1:
Added Windows implementation using Skia for PepperFlashFontFileHost.
This patch adds a simple Windows implementation of PepperFlashFontFileHost
using Skia to access the font data. By implementing this PepperFlash can
remove some use cases of GDI to support Win32k lockdown.
AUTHOR=forshaw@google.com
Part 2:
To support win32k lockdown, Pepper flash needs to switch Win GDI font calls
to pp::flash::FontFile PPAPI. This API was only supported on Linux, and it
is supported on Windows starting from M48.
Considering backward compatibility, we still need to fallback to GDI calls
for Chrome versions where Win32k lockdown is not available yet. We add a new
version of PB_Flash_FontFile interface: PPB_FLASH_FONTFILE_INTERFACE_0_2
This new version does not change any API, its availability shows that
pp::flash:FontFile is supported for Windows, and Pepper flash can use
it to decide whether it should call pp::flash:FontFile API or fall back
to Win GDI calls.
AUTHOR=xzhang@adobe.com
BUG=523278
R=bbudge@chromium.org, raymes@chromium.org, forshaw@google.com
Review URL: https://codereview.chromium.org/1416643002
Cr-Commit-Position: refs/heads/master@{#357457}
Replace OutputNotAllowed with OutputRestricted and add Released.
These values have been added to the spec, so allow them to be returned
from the CDM.
BUG=528347
Review URL: https://codereview.chromium.org/1354723003
Cr-Commit-Position: refs/heads/master@{#351878}
Speex was removed from the chromium third party dependencies. Since Opus was
designed as a replacement for Speex, let's just drop Speex from the pepper
api.
BUG=461222
Review URL: https://codereview.chromium.org/1351323002
Cr-Commit-Position: refs/heads/master@{#349658}