0
Commit Graph

1909 Commits

Author SHA1 Message Date
Takuto Ikuta
fc262dcd40 Remove include of base/containers/hash_tables.h except base/
Added some unordered_map/unordered_set include instead to fix build.

Bug: 576864
TBR: thakis@chromium.org
Change-Id: I8a23d908af392ced8fb2df0073e64e8020acc5fd
Reviewed-on: https://chromium-review.googlesource.com/c/1398161
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620639}
2019-01-08 06:26:58 +00:00
Antoine Labour
1316afd20f Change gpu::Buffer and gpu::BufferBacking to use uint32_t sizes
Because client and service may be of different bitness, offsets in command
buffers have to fit in a uint32_t, effectively limiting transfer buffers
to 4GB. This makes it clearer by enforcing it on IPC boundaries and
using uint32_t for the size, removing casts along the way.

Bug: 905509
Change-Id: Iabd9d01e5a8c93c8efea909a6df7d588de14c4fb
Reviewed-on: https://chromium-review.googlesource.com/c/1396861
Commit-Queue: Antoine Labour <piman@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620510}
2019-01-07 22:43:23 +00:00
Takuto Ikuta
8332bf9da1 Replace base::hash_set with std::unordered_set
base::hash_set is alias of std::unordered_set now.

I applied following command to make this CL.

$ git grep -l 'base::hash_set' | fgrep -v base/ | xargs sed -i -e 's/base::hash_set/std::unordered_set/g' -e 's/\(#include <[a-z_]*>\)/\1\n#include <unordered_set>/' -e 's/BASE_HASH_NAMESPACE/std/'
$ git cl format

TBR: dcheng@chromium.org
Bug: 576864
Change-Id: I89535173626483c06989b4d8a99dc46c1d49ce7b
Reviewed-on: https://chromium-review.googlesource.com/c/1390887
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620168}
2019-01-05 03:58:00 +00:00
Antoine Labour
5cb6cecb3b Have CommandBuffer::CreateTransferBuffer take a uint32_t instead of size_t
Because client and service may be of different bitness, offsets in command
buffers have to fit in a uint32_t, effectively limiting transfer buffers to 4GB.
Make this clear in CommandBuffer::CreateTransferBuffer by taking a uin32_t
instead of a size_t (fixing callers as appropriate), avoiding potential security
issues with silent clamping.

Bug: 905509
Change-Id: I8392f2e73e95bf65e08fa9896e2acc53afa0d268
Reviewed-on: https://chromium-review.googlesource.com/c/1396132
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620132}
2019-01-05 00:47:25 +00:00
Takuto Ikuta
adf31eb3e5 Replace base::hash_map with std::unordered_map
base::hash_map is alias of std::unordered_map now.

I applied following command to make this CL.

$ git grep -l 'base::hash_map' | fgrep -v base/ | xargs sed -i -e 's/base::hash_map/std::unordered_set/g' -e 's/\(#include <[a-z_]*>\)/\1\n#include <unordered_map>/' -e 's/BASE_HASH_NAMESPACE/std/'
$ git cl format
$ # Added IntPairHash and replaced BASE_HASH_NAMESPACE with std in some places.

TBR: dcheng@chromium.org
Bug: 576864
Change-Id: I38941d9f9bcb05ec474b8dee5230c4c5dcd2211f
Reviewed-on: https://chromium-review.googlesource.com/c/1390892
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620124}
2019-01-05 00:32:48 +00:00
Avi Drissman
ef8bbedcad Use base::size rather than arraysize in ppapi/.
This is purely a mechanical change; there is no intended behavior change.

BUG=837308
TBR=raymes@chromium.org

Change-Id: I72d85808c431221bac3e8f392f4be78c1856c401
Reviewed-on: https://chromium-review.googlesource.com/c/1390418
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618841}
2018-12-24 22:34:50 +00:00
Avi Drissman
062fbaf0f4 Remove linked_ptr.
BUG=556939
TBR=rogerta@chromium.org
TBR=bbudge@chromium.org

Change-Id: I11091ef719405e2a716b1e75b9df86018aba26e2
Reviewed-on: https://chromium-review.googlesource.com/c/1381517
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618695}
2018-12-22 00:54:24 +00:00
Sunny Sachanandani
267428faed Reland "Remove WaitSyncTokenCHROMIUM command"
This reverts commit c19106d109.

Original change's description:
> Remove WaitSyncTokenCHROMIUM command
>
> After migrating InProcessCommandBuffer to use GPU scheduler, most tasks
> are scheduled after their sync token dependencies are satisifed (see
> crrev.com/c/1157874).
>
> The one exception was the WaitSyncToken IPC used by ReturnFrontBuffer
> for pepper, which specifies a sync token, and waits while handling the
> message.
>
> Change ReturnFrontBuffer to contain the sync token, and use it to
> specify the dependency to the scheduler.
>
> Remove WaitSyncTokenCHROMIUM command, since sync token dependencies are
> specified as task metadata in all cases.
>
> Make other cleanups such as removing unnecessary sync token tests, and
> make sure the sync token code paths are not used where unsupported by
> using NOTREACHED.
>
> 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: Ieee4f6e2427a59a4e0c4b3c983cb489741241272
> Bug: 778753
> Reviewed-on: https://chromium-review.googlesource.com/c/1168155
> Reviewed-by: Bo <boliu@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#599849}

Bug: 778753, 895984

TBR=dcheng@chromium.org,boliu@chromium.org,piman@chromium.org

Change-Id: I07943fdcbb131566718d51e78f134975ec53b62e
Reviewed-on: https://chromium-review.googlesource.com/c/1361870
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615387}
2018-12-11 02:21:05 +00:00
Daniel Bratell
032fadc273 Don't build ppapi/{proxy,shared_impl} with jumbo in nacl
An upcoming CL triggers nacl toolchain problems in jumbo builds where
some combination of template instantiations cause some build errors.
To not block that CL, disable jumbo for nacl in relevant directories.

Bug: 912152
Change-Id: Ie79729414d765fec22325bacdb7df8cf714457f3
Reviewed-on: https://chromium-review.googlesource.com/c/1363282
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#614014}
2018-12-05 17:48:42 +00:00
Hans Wennborg
b6f010b107 IPC_STRUCT_BEGIN: Don't explicitly default copy constructors etc
The classes may not actually be copyable, copy-assignable, etc. Previously the
compiler would not complain until trying to *use* the defaulted ctor/operator,
but the new -Wdefaulted-function-deleted warning warns about this up front.

(As a concrete example, ExtensionMsg_TabConnectionInfo isn't copy-assignable
because of base::DictionaryValue member, which is a base::Value, which can't
be copied.)

To ensure these structs are still movable, remove the user-declared destructor.
This is also a simplification in that it removes all the code that was necessary
to define that destructor out-of-line.

Bug: 890307
Change-Id: I27ec3a0639bdeb94776acdd78b173791d0b8162d
Reviewed-on: https://chromium-review.googlesource.com/c/1261082
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610331}
2018-11-22 07:26:07 +00:00
Daniel Bratell
96fcc57631 Jumbo support for ppapi (-7.5 CPU minutes)
Jumbo is a unity build system for Chromium (see
https://chromium.googlesource.com/chromium/src/+/lkgr/docs/jumbo.md )
which merges cc files at the build target level.

The code in //ppapi needs roughly 15 CPU minutes to compile in my
measurements, which is 2.3% of the total jumbo build time and one of
the largest remaining non-thirdparty code blocks without jumbo support.

This saves about 7.5 CPU minutes in a jumbo build, which is
a bit over 1% of the total reference build time. It doesn't cover
thunk which is most of the remaining compile time. There are
too much generated code with reused symbol names in thunk for it
to be trivially supported right now.

Bug: 898475
Change-Id: I1ee592578ac765cbd58cb856fcd5f331d3dd8c50
Reviewed-on: https://chromium-review.googlesource.com/c/1297366
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#609687}
2018-11-20 14:12:39 +00:00
Alexander Timin
4f9c35c363 [message_loop] Remove message_loop_forward.h
As a final step, replace all includes back:
- mv message_loop_current.h message_loop.h
- s/message_loop_forward.h/message_loop.h/ in all includes.
- s/message_loop_forward.h/message_loop.h/ in base/BUILD.gn
- Remove message_loop_forward.h from third_party/DEPS.

TBR=gab@chromium.org
R=gab@chromium.org
BUG=891670

Change-Id: I623077025701459ddb7045cbcfdad138aa90a9e4
Reviewed-on: https://chromium-review.googlesource.com/c/1313110
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604690}
2018-11-01 20:15:20 +00:00
Alexander Timin
c643d0e146 [message_loop] Temporary introduce message_loop_forward.h.
To facilitate splitting MessageLoop into MessageLoop and MessageLoopImpl
introduce message_loop_forward.h and use it everywhere.

- s/message_loop.h/message_loop_forward.h/ in all includes.
- Add message_loop_forward.h to base/BUILD.gn.
- Add message_loop_forward.h to third_party/DEPS.

TBR=gab@chromium.org
BUG=891670

Change-Id: Ibac3a24f5bd4291c9d57dd32c627477e4e6ef324
Reviewed-on: https://chromium-review.googlesource.com/c/1313108
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604672}
2018-11-01 19:43:28 +00:00
David Benjamin
bf3962f083 Fix invalid downcast in nacl_message_scanner.cc
The downcast wasn't necessary at all. We could just remove it. The
pointer is never actually used as a MessageType*, only upcast back to an
IPC::Message*. (There is a "dereference", but it is to pass into a method
taking const IPC::Message&.)

Leave it as an IPC::Message*.

Bug: 520760
Change-Id: I6ac697fc1676bd9bbc754c97e617ce297197432c
Reviewed-on: https://chromium-review.googlesource.com/c/1298455
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602752}
2018-10-25 16:46:20 +00:00
Daniel Bratell
d5850cc240 [ppapi] Renamed two global variables and types in ppapi/proxy
In jumbo build experiments, the different
InstanceToDispatcherMap types and g_instance_to_dispatcher
globals ended up in the same translation unit and thus the same
anonymous namespace where the symbols clashed. This just renames
them as Dispatcher -> PluginDispatcher/HostDispatcher.

Bug: 898475
Change-Id: Ieae4310fdbe7ea27954011964d2bb6fa4d83e338
Reviewed-on: https://chromium-review.googlesource.com/c/1297145
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#602647}
2018-10-25 08:40:55 +00:00
Daniel Bratell
eb5dcdedd0 [ppapi] Merged three RunCallback methods doing the same thing
In jumbo build experiments, the different RunCallback functions
ended up in the same translation unit and thus the same
anonymous namespace where the symbols clashed. Since they,
and VideoDecoderResource::RunCallbackWithError had the same
implementation, this merges the functions into a shared
SafeRunCallback.

Bug: 898475
Change-Id: I3ee20972794d3c6ef73e49882e1ceba24c487e19
Reviewed-on: https://chromium-review.googlesource.com/c/1297427
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#602646}
2018-10-25 08:39:50 +00:00
Antoine Labour
ebdc72fd7b Simplify internalformat handling for GpuMemoryBuffer
For any given BufferFormat, there is a single internal format that it is
compatible with (note, the converse isn't true), as defined by
gpu::IsImageFormatCompatibleWithGpuMemoryBufferFormat.

Rather than leaving guess-work to the client, instead expose it via a
gpu::InternalFormatForGpuMemoryBufferFormat. This in turns simplifies
quite a few things, and in particular we don't need to send redundant
information in IPC (BufferFormat vs internalformat) that we then need to
validate.

Bug: 870116
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_layout_tests_slimming_paint_v2;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: I34a12c71c252ba2a5199f47ce983a02307df351b
Reviewed-on: https://chromium-review.googlesource.com/c/1290192
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601193}
2018-10-19 17:01:47 +00:00
Ryan Harrison
c6082cfb51 Improve matching of similar characters in PDF search
This CL changes the ICU collator being used for text searching in the
PDF viewer from the default to the 'search' one. This is the same
collator used in Blink, and it folds together similar looking
characters in a locale specific way, so that things like accented and
unaccented vowles will match or not match dependent on the
expectations of the user locale.

Additionally, when searching single and double quotation characters
are being simplified to the ASCII forms of them to make matching
between defferent types of quotes work better. Quotation marks are a
known limitation of the search collator and this workaround is based
off a similar solution that exists in Blink to improve matching.

BUG=chromium:142627

Change-Id: I399ea1f0bacb58434b468866127a91ccb6213e99
Reviewed-on: https://chromium-review.googlesource.com/c/1281178
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601157}
2018-10-19 15:18:55 +00:00
Sunny Sachanandani
063f6d2a28 Revert "Remove WaitSyncTokenCHROMIUM command"
This reverts commit c19106d109.

Reason for revert: Causing multiple mac gpu fyi failures crbug.com/895984

Original change's description:
> Remove WaitSyncTokenCHROMIUM command
> 
> After migrating InProcessCommandBuffer to use GPU scheduler, most tasks
> are scheduled after their sync token dependencies are satisifed (see
> crrev.com/c/1157874).
> 
> The one exception was the WaitSyncToken IPC used by ReturnFrontBuffer
> for pepper, which specifies a sync token, and waits while handling the
> message.
> 
> Change ReturnFrontBuffer to contain the sync token, and use it to
> specify the dependency to the scheduler.
> 
> Remove WaitSyncTokenCHROMIUM command, since sync token dependencies are
> specified as task metadata in all cases.
> 
> Make other cleanups such as removing unnecessary sync token tests, and
> make sure the sync token code paths are not used where unsupported by
> using NOTREACHED.
> 
> 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: Ieee4f6e2427a59a4e0c4b3c983cb489741241272
> Bug: 778753
> Reviewed-on: https://chromium-review.googlesource.com/c/1168155
> Reviewed-by: Bo <boliu@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#599849}

TBR=dcheng@chromium.org,boliu@chromium.org,sunnyps@chromium.org,piman@chromium.org

Change-Id: I87347c05dded27955410b08e40f37388a484d5f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 778753, 895984
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
Reviewed-on: https://chromium-review.googlesource.com/c/1284394
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600102}
2018-10-16 20:23:07 +00:00
Sunny Sachanandani
c19106d109 Remove WaitSyncTokenCHROMIUM command
After migrating InProcessCommandBuffer to use GPU scheduler, most tasks
are scheduled after their sync token dependencies are satisifed (see
crrev.com/c/1157874).

The one exception was the WaitSyncToken IPC used by ReturnFrontBuffer
for pepper, which specifies a sync token, and waits while handling the
message.

Change ReturnFrontBuffer to contain the sync token, and use it to
specify the dependency to the scheduler.

Remove WaitSyncTokenCHROMIUM command, since sync token dependencies are
specified as task metadata in all cases.

Make other cleanups such as removing unnecessary sync token tests, and
make sure the sync token code paths are not used where unsupported by
using NOTREACHED.

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: Ieee4f6e2427a59a4e0c4b3c983cb489741241272
Bug: 778753
Reviewed-on: https://chromium-review.googlesource.com/c/1168155
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599849}
2018-10-16 04:39:53 +00:00
Florent Castelli
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
Matt Menke
80c224c08e 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.

This is a reland of https://chromium-review.googlesource.com/1171568,
which was reverted due to tests failing on OSX when broadcast was set
only after calling Bind, due to the Bind call failing. The new CL
uses a new UDPSocketOption to allow broadcast before calling Bind on
the underlying socket.

TBR=jam@chromium.org, rhalvati@chromium.org

Bug: 848078, 876824
Change-Id: I0e31a357eb4b80bb78bae32f2a3ea3ce331256ec
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/1190407
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586497}
2018-08-27 23:44:45 +00:00
Jonathan Ross
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
Matt Menke
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
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
Trent Apted
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
Daniele Castagna
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
Antoine Labour
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
Alexandr Ilin
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
Alexandr Ilin
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
xlou
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
Ken Rockot
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
Sadrul Habib Chowdhury
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
Antoine Labour
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
Marijn Kruisselbrink
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
Robbie McElrath
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
Antoine Labour
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
Alexandr Ilin
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
Alexandr Ilin
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
Alexandr Ilin
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
Alexandr Ilin
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
Alexandr Ilin
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
Marijn Kruisselbrink
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
Matt Reynolds
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
Lei Zhang
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
Eric Karl
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
Gabriel Charette
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
xlou
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
xlou
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
Henrik Boström
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