0
Commit Graph

4429 Commits

Author SHA1 Message Date
3ea4abbfde Revert "Make PepperUdpSocketMessageFilter use NetworkService UDP API."
This reverts commit cc2b634dbe.

Reason for revert: Multiple PPAPI tests have begun failing on different OSes after this patch lands. See crbug.com/876824

Original change's description:
> Make PepperUdpSocketMessageFilter use NetworkService UDP API.
> 
> This CL moves all of the logic over to the UI thread, to keep things
> relatively simple and minimize thread hops, since that's where core
> network service objects live.
> 
> It also fixes a pre-existing bug in the PPAPI UDP code, where read
> errors that occur when there's no pending read are converted into
> 0-byte read successes.
> 
> Bug: 848078
> Cq-Include-Trybots: luci.chromium.try:linux_mojo
> Change-Id: Id6d23c26c1ac085211dfcfe23502a307fc29a284
> Reviewed-on: https://chromium-review.googlesource.com/1171568
> Commit-Queue: Matt Menke <mmenke@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
> Reviewed-by: Helen Li <xunjieli@chromium.org>
> Reviewed-by: Bill Budge <bbudge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#585057}

TBR=bbudge@chromium.org,jam@chromium.org,mmenke@chromium.org,xunjieli@chromium.org,rhalavati@chromium.org

Change-Id: I68b625673615275c102a95aac7df7583a2f7c97d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 848078
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/1185682
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Commit-Queue: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585196}
2018-08-22 19:22:39 +00:00
cc2b634dbe Make PepperUdpSocketMessageFilter use NetworkService UDP API.
This CL moves all of the logic over to the UI thread, to keep things
relatively simple and minimize thread hops, since that's where core
network service objects live.

It also fixes a pre-existing bug in the PPAPI UDP code, where read
errors that occur when there's no pending read are converted into
0-byte read successes.

Bug: 848078
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: Id6d23c26c1ac085211dfcfe23502a307fc29a284
Reviewed-on: https://chromium-review.googlesource.com/1171568
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Helen Li <xunjieli@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585057}
2018-08-22 16:33:43 +00:00
b9181af2a4 Convert PepperHostResolverMessageFilter to use the mojo host resolver.
Bug: 821021
Change-Id: I420e1c9493b4eea33632e4b8b20c18b0a3abcb01
Reviewed-on: https://chromium-review.googlesource.com/1182009
Reviewed-by: Doug Turner <dougt@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584780}
2018-08-21 16:33:36 +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
a250ec3ab9 Introduce an ObserverList<T>::Unchecked type alias.
This is a precursor to https://crrev.com/c/1053338 which introduces
base::CheckedObserver. Existing observers will be unchecked (as they
are already). There is no behavior change with this CL.

The CL is mechanical. The bulk was done with variations on a sed script:

git grep -l ' base::ObserverList<.*> .*;' -- '*.cc' '*.h' '*.mm' | \
  xargs -IX sed -i -r 's/(^[ ]*)base::ObserverList<([^>]*)> (.*);/'\
    '\1base::ObserverList<\2>::Unchecked \3;/' X

With some manual follow-ups to get special cases.

TBR=gab@chromium.org

Bug: 842987
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:ios-simulator-full-configs;luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:linux_mojo;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Idffe88e2b52f67f9226eb7b6d922070349dacc22
Reviewed-on: https://chromium-review.googlesource.com/1175511
Commit-Queue: Trent Apted <tapted@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584330}
2018-08-19 08:52:19 +00:00
e0903d1898 Convert PepperTCPSocketMessageFilter to use the mojo host resolver.
Bug: 821021
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: Ic6422ecc5f2298c25a8720a7dfeac17114ede0ad
Reviewed-on: https://chromium-review.googlesource.com/1173492
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583419}
2018-08-15 22:26:22 +00:00
ddef0218ea Replace NULL with nullptr in //gpu
NULL blocks scoped_refptr to support nullptr, and eventually blocks the
removal of its implicit raw-pointer-to-scoped_refptr conversion.

This CL replaces all relevant NULL in //gpu with nullptr.

Tbr: bbudge@chromium.org
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I6009249763ed14961bd5a725534419d2d0bf71f0
Reviewed-on: https://chromium-review.googlesource.com/1168960
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582855}
2018-08-14 07:08:33 +00:00
5f7fe46e2a Set proper PPAPI SandBoxSupport thread check
Replace current ThreadId check with a sequence checker.

We also add a test that tests font fallback, so
PpapiBlinkPlatformImpl::SandboxSupport::GetFallbackFontForCharacter
actually gets tested somewhere.

Bug: 866645
Change-Id: I743eb9cd6a1004c25074b907a50e9b4cf680f805
Reviewed-on: https://chromium-review.googlesource.com/1165312
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Fernando Serboncini <fserb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581302}
2018-08-07 19:17:49 +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
9c0a77d2c6 Add explicit version of PPB_CORE_INTERFACE in module.cc.
This fixes a presubmit error:

** Presubmit ERRORS **
Unversioned PPB interface references found in PPAPI C++ wrappers:

***************
ppapi/cpp/module.cc
***************

Change-Id: Ic9ff58e2ce8ea591a507c75498b0be8bccb3a8aa
Reviewed-on: https://chromium-review.googlesource.com/1157170
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579616}
2018-07-31 23:27:20 +00:00
141a88a772 pappi: TakeFrontBuffer only once in singlebuffer mode
Single buffer mode for pepper relied on TakeFromBuffer associating
different mailboxes to the same texture.
This does not work anymore after https://crrev.com/c/1097696 and
single buffer nacl plugins now sends invalid mailboxes to the compositor.

This CL fixes the issue making sure that Graphics3D is aware of the
single buffer mode and it will associate only one mailbox, only once,
to the front buffer.

Bug: 866643, b/111601347
Test: http://nacl-latency.firebaseapp.com runs without flickering

Change-Id: I8625fbb87bf3e9503068681bed681c88a068a123
Reviewed-on: https://chromium-review.googlesource.com/1144486
Commit-Queue: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579123}
2018-07-30 19:41:23 +00:00
4b15cfbec4 PPAPI: flush if pending before DestroyTransferBuffer
http://crrev.com/c/1105466 changed the precondition for
CommandBuffer::DestroyTransferBuffer to only require an OrderingBarrier
rather than a full flush, but the implementation in
PpapiCommandBufferProxy wasn't fixed to handle that.
This change ensures we issue the flush before the DestroyTransferBuffer
IPC if one is pending.

Bug: 866644
Change-Id: I6d6a3b6a752c4bfcd32f66153c84829140ed2b5f
Reviewed-on: https://chromium-review.googlesource.com/1152149
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578511}
2018-07-27 01:43:38 +00:00
41ff8336af ppapi: generators: strip trailing blank lines
Newer pylint warns when files have trailing blank lines.  Trim them.

Bug: 866772
Change-Id: I20739c2086c1fac0a802c07e9f4baa5f8bbf4291
Reviewed-on: https://chromium-review.googlesource.com/1148000
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577582}
2018-07-24 16:53:06 +00:00
9970f20e1b [base] Change Value::BlobStorage to std::vector<uint8_t>
This change updates Value::BlobStorage to be a std::vector<uint8_t>
instead of std::vector<char>. In order to minimize code-breakage, a
converting constructor is added.

TBR=fukino@chromium.org, boliu@chromium.org, rockot@chromium.org, chcunningham@chromium.org, bbudge@chromium.org

Bug: 646113, 864676
Change-Id: Ifbb0ecd116a95135ac7218d2accc8ac841e59db9
Reviewed-on: https://chromium-review.googlesource.com/1137819
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576996}
2018-07-20 21:41:18 +00:00
9710afc350 Allow connections to port 65535.
KURL used to use this to mean invalid port, but that behavior has been
removed.

BUG=606462

Change-Id: I320aace82e3065c952ba3ae7d88114460dc44a05
Reviewed-on: https://chromium-review.googlesource.com/1143685
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Ryan Hamilton <rch@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576868}
2018-07-20 15:23:42 +00:00
1ce671509c device: Convert GamepadSharedBuffer to the new shared memory API
This CL replaces all uses of base::SharedMemory and base::SharedMemoryRegion
with the new shared memory classes. New classes can be used both in the
renderer and the ppapi plugin processes.

Bug: 865102
Change-Id: I4ccc52990a0aa8a65ac701b92c45b792188506f8
Reviewed-on: https://chromium-review.googlesource.com/1142161
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576622}
2018-07-19 20:59:35 +00:00
15bb703ccf gpu: Convert command and transfer buffers to the new shared memory API
This CL replaces the deprecated base::SharedMemory in
gpu::SharedMemoryBufferBacking with the base::UnsafeSharedMemoryRegion. This
involves cascading changes in many other files including the change of
parameters in GpuChannelMsg_CreateCommandBuffer and
GpuCommandBufferMsg_RegisterTransferBuffer ipc messages.

Bug: 861844
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I7c7afecd9fbf6d268ed72233f2e85a6f2d93da51
Reviewed-on: https://chromium-review.googlesource.com/1127948
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574872}
2018-07-13 10:09:06 +00:00
6bd7c2d137 Change num_pages_per_sheet to pages_per_sheet.
Since the UI displays Pages Per Sheet for the N-up setting, and there
was a review comment previously to rename it to pages_per_sheet, so I
am renaming the variable name here.

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.

Bug: 775999
Change-Id: I538c22a450a603f6b0896a2c5c4273052ba9e969
Reviewed-on: https://chromium-review.googlesource.com/1128325
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Sean Kau <skau@chromium.org>
Reviewed-by: Chris Palmer <palmer@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Shirleen Lou <xlou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573588}
2018-07-10 01:35:40 +00:00
f03d97c950 Mojo EDK -> Core: Misc top-levels
Moves all remaining dependencies from mojo/edk to mojo/core, covering the
top-levels that had relatively few dependencies to begin with.

All mechanical changes, hence TBR(s).

TBR=rkc@chromium.org
TBR=rogerta@chromium.org
TBR=sunnyps@chromium.org
TBR=mmenke@chromium.org
TBR=bbudge@chromium.org
TBR=fmalita@chromium.org
TBR=tsepez@chromium.org
TBR=peria@chromium.org
TBR=dcheng@chromium.org

Bug: None
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I4961ea707383e161d4b8f2c0de8341c0010b4485
Reviewed-on: https://chromium-review.googlesource.com/1126418
Commit-Queue: Ken Rockot <rockot@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572665}
2018-07-04 22:08:10 +00:00
f4345313ca New test: Plugins (e.g. Flash) VS Cross-Origin Read Blocking (CORB).
This CL adds tests that verify that Cross-Origin Read Blocking (CORB)
won't block HTTP responses for requests initiated by plugins that have
been granted universal access (like Flash which has its own CORS-like
mechanism - crossdomain.xml).

In addition to running tryjobs, I've also tested this CL by temporarily
editing CrossSiteDocumentResourceHandler::ShouldBlockBasedOnHeaders to
comment out the exception carved out for plugins (the new
TestTrustedCorbEligibleRequest test expectedly failed with such an edit
both with and without NetworkService).

Bug: 846339
Change-Id: I7b7befff3018ed5a7bd834b2bf0507c2e1f6365b
Reviewed-on: https://chromium-review.googlesource.com/1101300
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568081}
2018-06-18 18:23:38 +00:00
89a1fbded1 gpu: Remove snapshot related code.
With the change to using presentation-feedback for facilitating snapshot
requests (crrev.com/c/1095562), the snapshot-specific code in gpu can
now be removed.

BUG=851504

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I25b563f879bb66c345ba541df736efc65a834f0d
Reviewed-on: https://chromium-review.googlesource.com/1096669
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567311}
2018-06-14 17:00:41 +00:00
3a776dc182 Merge GenMailboxCHROMIUM into ProduceTextureDirectCHROMIUM
ProduceTextureDirectCHROMIUM is always called after GenMailboxCHROMIUM
(or equivalently gpu::Mailbox::Generate()), so merge both calls into a
single one. This isn't intended to change any behavior.

Note, TakeFrontBuffer still takes an explicitly generated gpu::Mailbox.

Bug: 847674
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I7227ddffba6291c1efe3ed589bfbc6166f3319fe
Reviewed-on: https://chromium-review.googlesource.com/1089695
Commit-Queue: Antoine Labour <piman@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Jonathan Backer <backer@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Reviewed-by: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566633}
2018-06-13 00:07:48 +00:00
9ebd7ba4d0 Remove DownloadToFile support from the loading stack.
This removes the DownloadToFile option from ResourceRequest, as well
as URLLoaderClient.OnDataDownloaded and the downloaded_file argument
to OnReceiveResponse, as nothing is using this anymore.

Also removes the actual implementation of the feature, as well as all
the bits of plumbing that are now no longer needed.

Note that there is still a blink::Resource::DidDownloadData,
blink::RawResourceClient::DataDownloaded etc, as from that layer down
these callbacks are also used by the download-to-blob functionality that
replaced download-to-file.

Bug: 791702
Change-Id: I616a829630a285bbfc580d62f7b8de7ed3b406ea
Reviewed-on: https://chromium-review.googlesource.com/1064798
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566193}
2018-06-11 23:18:04 +00:00
Wez
b539a72225 Remove unused ppapi::AppID values.
Each PPAPI interface had an associated ppapi::AppID, used as its IPC
routing-Id. Many interfaces still have Ids listed, despite no longer
using them.

Change-Id: Id8017f5861e12d0be14c5dc108c6c6023c3bbd3f
Reviewed-on: https://chromium-review.googlesource.com/1086489
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565411}
2018-06-07 21:14:42 +00:00
81fd1e5799 Move GamepadHardwareBuffer typedef to device/gamepad/public/mojom.
Bug: 612330
Change-Id: I9f99f13f6450787fa8cee7e8dfb73edb10c961dd
Reviewed-on: https://chromium-review.googlesource.com/1089632
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565109}
2018-06-07 00:01:41 +00:00
04cb3b28bc PPB_VideoDecoder: create mailbox names on the plugin side
For obscure historical reasons, mailbox names were created on the
renderer side whereas the textures are produced on the plugin side. Move
the mailbox name creation to the plugin side so that it happens when the
textures are produced. A follow-up will merge the 2 operations.

Bug: 847674
Change-Id: Ia8cde57c2c0421e1361ddb14de63f02a34ea9b6f
Reviewed-on: https://chromium-review.googlesource.com/1081669
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563858}
2018-06-01 23:25:10 +00:00
002a9a285a Convert media audio input classes to the shared memory API
This CL replaces base::SharedMemory and base::SharedMemoryHandle classes by the
base::ReadOnlySharedMemoryRegion in the code related to the audio input on the
renderer side, notably AudioInputDevice and PepperAudioInputHost.

Bug: 844508
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ifb3acc771cb9efcda8f22b2647ceca880451d453
Reviewed-on: https://chromium-review.googlesource.com/1078817
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Max Morin <maxmorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563608}
2018-06-01 13:32:18 +00:00
20f2841cfd Convert media audio output classes to the new shared memory API.
This CL replaces base::SharedMemory and base::SharedMemoryHandle classes by the
base::UnsafeSharedMemoryRegion in the code related to the audio output on the
renderer side. The dependency chain starts from the content::MojoAudioOutputIPC.

Bug: 844508
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I03b92dcf929fdf050029f8d97b56343ecf7b3a27
Reviewed-on: https://chromium-review.googlesource.com/1076547
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Max Morin <maxmorin@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563596}
2018-06-01 11:56:18 +00:00
c7d975fa69 ppapi: Add methods for sharing new shared memory classes with remote
This CL adds two new methods, ShareUnsafeSharedMemoryRegionWithRemote() and
ShareReadOnlySharedMemoryRegionWithRemote() to
ppapi::proxy::ProxyChannel::Delegate and to content::RendererPpapiHost classes
and all implementation classes.

These new methods are similar to the SharedSharedMemoryHandleWithRemote()
method in those classes but are supposed to work with the new shared memory
API.

Bug: 845985
Change-Id: I8ccd92a1c81dca9495c85119e9a4e40fd6b69abf
Reviewed-on: https://chromium-review.googlesource.com/1078847
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563571}
2018-06-01 09:25:41 +00:00
ebab9dadca ppapi: Add SHARED_MEMORY_REGION type to SerializedHandle
This CL adds a new SHARED_MEMORY_REGION type to the SerializedHandle. This new
type is backed up by the base::subtle::PlatformSharedMemoryRegion class that
provides a new recommended API for the shared memory in Chrome.
Eventually, all uses of the SHARED_MEMORY type should be converted to the
SHARED_MEMORY_REGION.

Bug: 845985
Change-Id: Icfb4605dadb6f111efe953d8b940cc879fa40763
Reviewed-on: https://chromium-review.googlesource.com/1076334
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563500}
2018-06-01 02:37:47 +00:00
ce772faa73 Remove references to exe_and_shlib_deps in src
After [1], a manual dependency on exe_and_shlib_deps is no longer necessary
since it's automatically added.  This CL removes all remaining manual references
to exe_and_shlib_deps.

[1] d7ed1f0a9c

BUG=845700
R=dpranke
TBR=sky,mark

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:ios-simulator-full-configs;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_compile_x64_dbg;master.tryserver.chromium.android:android_compile_x86_dbg;master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.linux:closure_compilation;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I647442fb09eba4c055697bf26504abc3b3284d94
Reviewed-on: https://chromium-review.googlesource.com/1073613
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563028}
2018-05-30 22:20:37 +00:00
c81d89c760 [PPAPI] Make FileRef tests no longer depend on StreamToFile.
This moves TestSelectFileDialogFactory out of ppapi_filechooser_browsertest.cc
to its own separate file, so the FileRef tests can also use the same select
file dialog implementation to get access to an "external" file ref.

Bug: 823522, 791702
Change-Id: Ic68f15fe52e4cac78542ed01fe2ac76546e7fb78
Reviewed-on: https://chromium-review.googlesource.com/1065050
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562949}
2018-05-30 19:13:37 +00:00
1d004107b1 ppapi: Make SerializedHandle class move-only
This CL deletes the copy constructor and the copy assignment operator from the
ppapi::proxy::SerializedHandle class replacing them with move operations. This
is preparatory step to make SerializedHandle using the new shared memory
classes that are move-only.

SerializedHandle holds a system resource that should be properly closed after
use. Move semantics allow to introduce the more clear ownership model and
prevent resource leaks.

Bug: 845985
Change-Id: Ie7202d18f4f0396133c53ee0faee111e07c58ee8
Reviewed-on: https://chromium-review.googlesource.com/1073200
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562796}
2018-05-30 10:55:32 +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
7550995f30 Remove pepper's parallel gamepad struct definitions
Before gamepad was partially servicified, gamepad struct definitions
resided in WebKit. These definitions must be identical for all readers
and writers to the shared memory buffer for consistency. Since pepper
may not depend on WebKit, the structs were duplicated in the pepper
gamepad client.

Now these structs have been moved out of WebKit and can be shared with
other components by depending on the target
//device/gamepad/public/cpp:shared_with_blink. This CL removes the
duplicate pepper definitions and switches all usages to the //device
definitions.

BUG=694998

Change-Id: I4cf596f5cff18f6dc8945a422a3cc9f70711c10c
Reviewed-on: https://chromium-review.googlesource.com/1062600
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560914}
2018-05-23 03:12:55 +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
369074b55a Remove circular includes in arch_dependent_sizes_*
The include flow is:

test_struct_sizes.c
arch_dependent_sizes_(32|64).h
test_struct_sizes.c again
arch_dependent_sizes_(32|64).h again

then we hit the include guard as we've included the header twice

test_struct_sizes.c is the only file that includes either of these
headers, so the #include of test_struct_sizes.c is redundant.

Change-Id: I95a4efe45a46dfe26b9b0e60b15af702d5546717
Reviewed-on: https://chromium-review.googlesource.com/1055009
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Owen Rodley <orodley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558170}
2018-05-14 00:27:40 +00:00
b6b2c63d49 Generate Swap IDs client side and round-trip them through GPU proc
Currently we use the concept of a Swap ID in LatencyInfoCache. We want
to depend on this pattern in additional places as well.

Unfortunately, the ID used in LatencyInfoCache is loosely coupled to
the ID generated in the GPU proc - they seem to line up now, but
nothing guarantees they keep doing so.

To make this system more robust, this patch introduces client
generation of Swap IDs, which are then sent to the GPU proc and
round-tripped back to the client.

Bug: 837476
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr
Change-Id: I04f762c7f84a437b13fe1ff75abb13fc0237dc08
Reviewed-on: https://chromium-review.googlesource.com/1035536
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556588}
2018-05-07 22:45:04 +00:00
703cf3e54c Remove deprecated usage of URL.createObjectURL with MediaStream
Only straightforward usage has been removed, identified with regexp
"URL.createObjectURL.*stream".

Bug: 800767
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I83d563080b2f534e7d9e3062b1633017dc9a01a8
Reviewed-on: https://chromium-review.googlesource.com/878741
Commit-Queue: Florent Castelli <orphis@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555378}
2018-05-02 14:04:21 +00:00
629ba73c96 [MessageLoop] Fix message_loop.h includes
Removing 622 unnecessary includes and adding 14 missing includes.

Script used @ https://crbug.com/825327#c155 (tweaked from https://crbug.com/825327#c151)

R=fdoray@chromium.org
TBR=jam@chromium.org

Bug: 825327
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_mojo;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I943b9cd10d3c4ee7fb096c648a618a9a7032684c
Reviewed-on: https://chromium-review.googlesource.com/1035788
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555209}
2018-05-01 22:53:54 +00:00
a92b7636ee [MessageLoop] Fix random IWYU preventing message_loop.h cleanup
Precursor for
https://chromium-review.googlesource.com/c/chromium/src/+/1035788

TBR=fdoray@chromium.org

Bug: 825327
Change-Id: Ic6e7440c152dde11b6cab9c1ccddd46106d48d8b
Reviewed-on: https://chromium-review.googlesource.com/1037634
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555135}
2018-05-01 19:20:32 +00:00
b0b893714a Add override for overridden functions under /ppapi/tests/blink_deprecated_test_plugin.cc
This CL was uploaded by git cl split.

R=dcheng@chromium.org

Bug: 428099
Change-Id: I74496862747910cda6503376d82ccbd1cedeb368
Reviewed-on: https://chromium-review.googlesource.com/1032462
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554406}
2018-04-27 16:36:16 +00:00
4e63a51200 Add override for overridden functions under /ppapi/tests/blink_test_plugin.cc
This CL was uploaded by git cl split.

R=piman@chromium.org

Bug: 428099
Change-Id: Ie75f7c7e67ccd91c1e8fd8c0e51f9c66112cfe50
Reviewed-on: https://chromium-review.googlesource.com/1032461
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554405}
2018-04-27 16:35:21 +00:00
4f2a1530f9 Add unittest for PP_PrintSettings_Dev's new field.
A new field num_pages_per_sheet is added to PP_PrintSettings_Dev in
https://chromium-review.googlesource.com/c/chromium/src/+/1028992.
This CL modifies two existing tests to check the newly added field.

Bug: 775999
Change-Id: I79f8cd9ef32e3319150fee7f90b3f7b2a7d7965d
Reviewed-on: https://chromium-review.googlesource.com/1030774
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Shirleen Lou <xlou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554392}
2018-04-27 15:30:24 +00:00
24e9a046e7 Add override for overridden functions under /ppapi This CL was uploaded by git cl split.
R=bbudge@chromium.org

Bug: 428099
Change-Id: I56ba58104ee1844e8b26bfe088cdfbb8049d2f5d
Reviewed-on: https://chromium-review.googlesource.com/1032463
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554384}
2018-04-27 14:23:26 +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
fa5482eb76 Migrate MessageLoop::current() to MessageLoopCurrent in /ppapi
These changes were scripted as part of the effort to restrict exposure of the
raw MessageLoop*.

Note that many static methods exposed on MessageLoopCurrent are also deprecated
so it is very well possible that this is migrating to an already deprecated
method.

The goal of this pass is to reduce usage of MessageLoop::current() (and
ultimately make it impossible to obtain the MessageLoop* statically).

As such I will not edit this CL unless the script did something logically wrong.
I defer to owners to fix highlighted usage of already deprecated APIs.

Possible script screw ups / things to look out for in this review:
 - Storing MessageLoopCurrent in a MessageLoop* variable or comparing it against
   one (I will go over that in a separate pass).

Includes should have been stripped if that was the last usage of message_loop.h
in that file.

Please CQ if LGTY

This CL was uploaded by git cl split.

R=raymes@chromium.org

Bug: 825327
Change-Id: I2f106d59abb16b11a5b866bf109666bfad595823
Reviewed-on: https://chromium-review.googlesource.com/1024392
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552889}
2018-04-23 23:23:23 +00:00