0
Commit Graph

742 Commits

Author SHA1 Message Date
7f2909c480 Add enums for a "fit to paper" scaling print setting
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}
2019-09-19 15:32:08 +00:00
687a3b4cdc Show cursors only for available scrolling directions when autoscrolling
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}
2019-06-05 18:11:48 +00:00
d850caad93 Revert "[ppapi] Remove PPB_TrueTypeFont resource."
This reverts commit a10bfe5123.

Reason for revert: Breaks deterministic build product check (expectations need to be adjusted.)

https://ci.chromium.org/p/chromium/builders/ci/Deterministic%20Linux/22416

Original change's description:
> [ppapi] Remove PPB_TrueTypeFont resource.
> 
> - UMA shows this interface has no usage.
> 
> Change-Id: Ifcb68620aceab0d8a857b4a3a0c768990bf47905
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1546762
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Reviewed-by: Raymes Khoury <raymes@chromium.org>
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Sam Clegg <sbc@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#652404}

TBR=raymes@chromium.org,sky@chromium.org,bbudge@chromium.org,sbc@chromium.org,binji@chromium.org,tsepez@chromium.org

Change-Id: Iec735dd2220b443b0e8fddc93c7795e46dc7c0f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1574294
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652554}
2019-04-19 17:04:14 +00:00
a10bfe5123 [ppapi] Remove PPB_TrueTypeFont resource.
- UMA shows this interface has no usage.

Change-Id: Ifcb68620aceab0d8a857b4a3a0c768990bf47905
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1546762
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Sam Clegg <sbc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652404}
2019-04-18 23:55:54 +00:00
dfc22b6813 Undeprecate PPAPI WebSocket
Remove the deprecation console message and documentation comments for
PPAPI WebSocket. This is mostly a straightforward revert of
https://chromium-review.googlesource.com/c/chromium/src/+/1161712/
except that the enums have been left behind.

See
https://groups.google.com/a/chromium.org/d/msg/blink-dev/lWNvY56OAYs/9IoQx_ncDQAJ
for the background and justification for undoing the deprecation.

BUG=870586

Change-Id: I436e016b98e5e6224fca420ed769420f016bf6ac
Reviewed-on: https://chromium-review.googlesource.com/c/1402306
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622756}
2019-01-15 06:00:39 +00:00
c0c56e43d0 Remove PPB_Compositor
It's incompatible with shared images / Vulkan, and it usage is extremely
low (not available on stable except for ARC, which doesn't use it any
more).

Bug: 918951
Change-Id: Ia01d2b276456536394fecffb39d5ea6c90cfe0de
Reviewed-on: https://chromium-review.googlesource.com/c/1396611
Commit-Queue: Antoine Labour <piman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621778}
2019-01-10 22:26:07 +00:00
506a63083c Remove ppapi/api/owners and let ppapi/owners handle these reviews.
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}
2018-10-08 20:27:16 +00:00
de49ea19de Remove VideoDestination_Private and VideoSource_Private PPAPI
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}
2018-09-05 10:32:50 +00:00
Wez
c0debd5867 Remove unused PPB_Flash_DRM:1.0 and PPB_Flash_DeviceID interfaces.
These interfaces have not been used by Flash for a long time now.

Change-Id: I53116e30145d7f322d2e27960b7b507691e75694
Reviewed-on: https://chromium-review.googlesource.com/1162585
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584765}
2018-08-21 16:08:40 +00:00
Wez
3835e3bfac Remove PPB_FlashFullscreen version 0.1 API.
This early revision of the API hasn't been in use for some time, so
remove it.

Change-Id: I79df9948f1844563de7b100e19f5d4444be731dc
Reviewed-on: https://chromium-review.googlesource.com/1161743
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584764}
2018-08-21 16:08:26 +00:00
77d2955c74 Add a deprecation message for PPAPI WebSocket
Display a console message (in the context of the page) when a WebSocket
is created via the Pepper pp::WebSocket API.

Also add deprecation warnings to the documentation.

Tested by manual verification that the console message is shown when
the PPAPI WebSocket browser_tests are run.

Intent to deprecate thread:
https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/3NYHaxhRs14/XOdUJBvHAwAJ

BUG=870586

Change-Id: Ib4631d11cd94cecad6c42e6b3fb1fb81ffc2b7fb
Reviewed-on: https://chromium-review.googlesource.com/1161712
Commit-Queue: Adam Rice <ricea@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581191}
2018-08-07 10:36:42 +00:00
23efe422cf Disable the DownloadToFile API in PPAPI.
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}
2018-05-24 23:17:42 +00:00
dc88867d7e Add a PrintBegin method to PPP_Pdf_1_1.
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}
2018-05-22 16:57:47 +00:00
1942075653 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.

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}
2018-04-26 23:42:44 +00:00
8a67bbaef8 Revert "Add N-up feature support to pdfium_engine."
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
     0x12c35d8e in WriteBytesCommon ./../../base/pickle.cc:430:3
     0x12c35d8e in void base::Pickle::WriteBytesStatic<4ul>(void const*) ./../../base/pickle.cc:395:0
     0xb00ffa1 in WritePOD<int> ./../../base/pickle.h:327:5
     0xb00ffa1 in WriteInt ./../../base/pickle.h:190:0
     0xb00ffa1 in Write ./../../ipc/ipc_message_utils.h:186:0
     0xb00ffa1 in WriteParam<unsigned int> ./../../ipc/ipc_message_utils.h:110:0
     0xb00ffa1 in IPC::ParamTraits<PP_PrintSettings_Dev>::Write(base::Pickle*, PP_PrintSettings_Dev const&) ./../../ppapi/proxy/ppapi_messages.h:223:0
     0xd1e82ee in MessageT<true, false> ./../../ipc/ipc_message_templates.h:124:33
...

 Uninitialized value was stored to memory at
     0xb010122 in IPC::ParamTraits<PP_PrintSettings_Dev>::Write(base::Pickle*, PP_PrintSettings_Dev const&) ./../../ppapi/proxy/ppapi_messages.h:0:1
     0xd1e82ee in MessageT<true, false> ./../../ipc/ipc_message_templates.h:124:33
     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
     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
     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
     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
     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
     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}
2018-04-25 10:55:16 +00:00
008759aa5b 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}
2018-04-25 02:35:23 +00:00
729d804e8f Remove platform verification pepper APIs
Now that CDMs use mojo exclusively, remove the Pepper APIs that are
now unused.

BUG=772160
TEST=compiles

Change-Id: I1639e3ab7f6fbb3e328a8b9b7c2a2e57c6d5467e
Reviewed-on: https://chromium-review.googlesource.com/1007885
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550079}
2018-04-12 07:35:26 +00:00
8682bf273c Remove output protection pepper APIs
Now that CDMs use mojo exclusively, remove the Pepper APIs that are
now unused.

BUG=772160
TEST=compiles

Change-Id: I4161d7430f86f5033dd7997fb5f2cc4a04aefa22
Reviewed-on: https://chromium-review.googlesource.com/988254
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549671}
2018-04-10 23:23:01 +00:00
e16205da43 Remove content decryptor pepper APIs
Now that CDMs use mojo exclusively, remove the Pepper APIs that are
now unused.

BUG=772160
TEST=compiles

Change-Id: Ifa77be717e7b11ab20ae8053901dcb663b1726cc
Reviewed-on: https://chromium-review.googlesource.com/981125
Commit-Queue: John Rummell <jrummell@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547187}
2018-03-30 16:43:58 +00:00
85d754a8d4 Add ppapi::PERMISSION_PDF and ppapi::PERMISSION_CROSS_ORIGIN_URL_LOADS
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}
2018-03-28 00:57:24 +00:00
1fc16aeea1 Apply automatic range checks to ppapi enums
This is part of a long-running background task to remove the remaining uses
of the unchecked IPC_ENUM_TRAITS() macro.

Bug: 246708
Change-Id: I2cbf13fb9c306dbc305796cc7d3799a98e43a5b6
Reviewed-on: https://chromium-review.googlesource.com/733843
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Rob Buis <rob.buis@samsung.com>
Cr-Commit-Position: refs/heads/master@{#514927}
2017-11-08 20:38:10 +00:00
c30aef43cf Apply automatic range checks to PP_DeviceType_Dev
This is part of a long-running background task to remove the remaining uses
of the unchecked IPC_ENUM_TRAITS() macro.

Bug: 246708
Change-Id: Id11af3208efa2fba36333e87aacb5c8eb111b3df
Reviewed-on: https://chromium-review.googlesource.com/677067
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Rob Buis <rob.buis@samsung.com>
Cr-Commit-Position: refs/heads/master@{#509508}
2017-10-17 20:36:33 +00:00
e5621c10a1 Reland "Implement Storage Id for encrypted media"
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}
2017-09-05 23:52:10 +00:00
195e051e1e Revert "Implement Storage Id for encrypted media"
This reverts commit 36e5b80ec7.

Reason for revert:
Suspected to be the culprit for consistent failures on Win7 Tests (dbg)(1) on
OutOfProcessPPAPITest.PlatformVerificationPrivate
Pepper/ECKEncryptedMediaTest.StorageIdTest/0

First failure
https://uberchromegw.corp.google.com/i/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/62797

Original change's description:
> Implement Storage Id for encrypted media
> 
> 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}

TBR=dcheng@chromium.org,bbudge@chromium.org,bauerb@chromium.org,xhwang@chromium.org,brettw@chromium.org,jrummell@chromium.org,tguilbert@chromium.org

Change-Id: Ib90607d0e8f3ac17ddc6b10cc2666879b15a9dd0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 478960
Reviewed-on: https://chromium-review.googlesource.com/645567
Reviewed-by: Henrik Boström <hbos@chromium.org>
Commit-Queue: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498808}
2017-08-31 10:43:02 +00:00
36e5b80ec7 Implement Storage Id for encrypted media
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}
2017-08-30 20:45:06 +00:00
4ec584b910 Clean up the CDM exception codes
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}
2017-08-15 22:54:25 +00:00
ada25fea21 media: Support GetStatusForPolicy() in pepper CDM
- 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}
2017-07-24 21:24:24 +00:00
dc89b1424f Update Platform Verification Pepper API to request Storage ID
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}
2017-07-12 00:24:56 +00:00
ca46de7342 ppapi: Add support for single buffer contexts.
BUG=732473

Change-Id: Ib89549a861016f0927bb6dfac2586be6e0ba1932
Reviewed-on: https://chromium-review.googlesource.com/529925
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479023}
2017-06-13 15:13:46 +00:00
424fd27db2 Add tilt_x and tilt_y to ppapi touchpoint.
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}
2017-05-26 10:22:25 +00:00
dac8e43d79 Ensure eng reviewers get cc'd on CLs touching the PPAPI
R=brettw@chromium.org

Change-Id: Icfdf3d825634073d458ec2ef7c96ffeba4cbb0a7
Reviewed-on: https://chromium-review.googlesource.com/508354
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#473127}
2017-05-19 08:06:53 +00:00
8e72a1beac Support Coalesced Touch in ppapi
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}
2017-05-15 21:35:35 +00:00
gab
2998ee7b31 Replace "nested message loop" with "nested run loop" in comments.
Following https://codereview.chromium.org/2818533003/

BUG=703346
TBR=danakj@chromium.org

Review-Url: https://codereview.chromium.org/2828913003
Cr-Commit-Position: refs/heads/master@{#469674}
2017-05-05 16:23:50 +00:00
3a2a470eed Support audio output device enumeration and selection in PPAPI
- 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}
2017-04-07 16:34:30 +00:00
c24785e7ff Fix range checking for PP_CdmKeyStatus
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}
2016-11-22 02:45:13 +00:00
8730a9894c Replace references to MediaStreamTrack.getSources() with enumerateDevices() in PPAPI.
MediaStreamTrack.getSources is scheduled for removal in M56.

BUG=388194

Review-Url: https://codereview.chromium.org/2474673002
Cr-Commit-Position: refs/heads/master@{#429361}
2016-11-02 19:22:15 +00:00
509e71d778 Remove 'char' from IDL
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}
2016-10-06 14:35:33 +00:00
3ae4a08aca This passes the recently added eraser tool type from ui events into
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}
2016-09-02 00:26:59 +00:00
000bd49898 ppapi: PPB_VpnProvider: Define API
tbr=sky@chromium.org for trivial change to chrome/common/ppapi_utils.

BUG=506490

Review-Url: https://codereview.chromium.org/1726303003
Cr-Commit-Position: refs/heads/master@{#393345}
2016-05-12 20:45:18 +00:00
d55efd0d4b Added SetLayerTransform to PPAPI.
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}
2016-04-21 19:36:29 +00:00
d095f27ed2 PPAPI: Remove PPB_Font_Dev. (try 2)
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}
2016-03-29 02:47:23 +00:00
259626c7ca Cleanup: Correctly spell success(ful).
TBR=brettw@chromium.org
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/1469783002

Cr-Commit-Position: refs/heads/master@{#361166}
2015-11-23 20:19:14 +00:00
ab637b451e Partial revert of r357449 to keep Flash 19.x working.
BUG=551093

Review URL: https://codereview.chromium.org/1416303007

Cr-Commit-Position: refs/heads/master@{#357968}
2015-11-05 01:23:06 +00:00
eca2b40dd6 Enable pp::flash::FontFile support on Windows
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}
2015-11-02 22:43:47 +00:00
d8ecc8472d PPAPI: Remove PPB_Font_Dev.
TBR=brettw@chromium.org

Review URL: https://codereview.chromium.org/1428653002

Cr-Commit-Position: refs/heads/master@{#357449}
2015-11-02 22:29:41 +00:00
636e3cf3cc Promote PPB_VideoDecoder 1.1 to Stable
Works just fine in ARC.

BUG=520323

Review URL: https://codereview.chromium.org/1369203003

Cr-Commit-Position: refs/heads/master@{#355667}
2015-10-22 23:21:23 +00:00
e9a0ee342d ppapi: Support up to 32 subsamples in PP_EncryptedBlockInfo.
The previous value was 16 which worked for most cases. But recently we saw
reports that there are cases that we could have 17 subsmples. Even thougt this
is very rare, but it makes sense to update our implementation to support that
case.

Our current implementation [1-2] supports this new size without requiring any
changes.

[1]
https://code.google.com/p/chromium/codesearch#chromium/src/media/cdm/ppapi/cdm_adapter.cc&rcl=1445081078&l=79
[2]
https://code.google.com/p/chromium/codesearch#chromium/src/content/renderer/pepper/content_decryptor_delegate.cc&l=128

BUG=543478

Review URL: https://codereview.chromium.org/1412323002

Cr-Commit-Position: refs/heads/master@{#355157}
2015-10-20 21:36:48 +00:00
7c04ca6d03 Update MediaKeyStatus enum values
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}
2015-10-01 20:44:00 +00:00
e982d804c5 ppapi: AudioEncode: drop Speex codec
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}
2015-09-18 13:34:20 +00:00
33e90877de ppapi: define PPB_AudioEncoder API
BUG=461222

Review URL: https://codereview.chromium.org/1128023009

Cr-Commit-Position: refs/heads/master@{#349418}
2015-09-17 14:42:04 +00:00