0
Commit Graph

13 Commits

Author SHA1 Message Date
Avi Drissman
821ca309ed Update header includes for /base/functional in /p*
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: 1364441
Change-Id: I36784c7cc322001d0b0ec2590c3847f4298033ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4157596
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091526}
2023-01-11 22:42:15 +00:00
Avi Drissman
db497b3200 Update copyright headers in pdf/, ppapi/, printing/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c95.

No-Try: true
Bug: 1098010
Change-Id: I6ae92e5d7ccbf73b176588124b2f8b4067f805b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3900575
Reviewed-by: Mark Mentovai <mark@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047628}
2022-09-15 19:47:28 +00:00
Anand K Mistry
9182c2a7da Update ppapi::proxy::PluginResource to work with OnceCallback
Update users of PluginResource to use base::BindOnce() instead of
base::Bind()

Bug: 1007816

Change-Id: Iecb9a3a2771849bf74b26f61b08bfe176ece5fb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2764085
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Anand K Mistry <amistry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#863634}
2021-03-17 04:40:08 +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
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
erikchen
a40775d038 Get rid of base::SharedMemory::NULLHandle();
This CL is a refactor and has no intended behavior change.

NullHandle() has two use cases:
  * Create an invalid handle.
  * Return an object that can be compared against a handle to check validity.
The former is also the behavior of the default constructor of
base::SharedMemoryHandle, and the latter should be done with the member
IsValid().

Fixing the latter also allows the removal of operator== and operator!=.

BUG=713763
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2849633002
Cr-Commit-Position: refs/heads/master@{#468231}
2017-04-29 07:15:49 +00:00
teravest@chromium.org
51b52c8964 Cleanup: Make gamepad API consistent.
In the "old proxy model", using EnterInstance<>, code always passed the
instance as the first argument. In the "new proxy model", using
EnterInstanceAPI<>, code is inconsistent, making it hard to automatically
generate thunk files from IDL.

This change updates the gamepad API to be consistent with many other interfaces
and the old proxy model.

BUG=


Review URL: https://chromiumcodereview.appspot.com/12568010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189169 0039d316-1c4b-4281-b951-d872f2087c98
2013-03-20 00:17:25 +00:00
raymes@chromium.org
109dcfb3cb Refactor the way singleton-style resources are exposed via PPB_Instance
Currently a lot of boilerplate needs to be added everytime we add a new singleton style resource and as we add more of them this will accumulate. This patch reduces the amount of code needed by exposing a GetSingletonResource function in PPB_Instance_API which takes an ID specifying what type of resource is needed. A new Enter type, EnterInstanceAPI, is provided which is templated on the singleton API you want access to.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170221 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-29 17:59:19 +00:00
yzshen@chromium.org
3e286c3c62 Avoid leaking SerializedHandles.
This CL automatically closes SerializedHandles at the receiving side of ResourceMessageParams (the host side for ResourceMessageCallParams; the plugin side for ResourceMessageReplyParams), if they are not taken by message handlers.

BUG=None
TEST=None


Review URL: https://chromiumcodereview.appspot.com/11312017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165799 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-02 23:24:56 +00:00
yzshen@chromium.org
9164da3d0c PluginResource: Avoid having two sets of similar methods for talking with browser and renderer.
BUG=None
TEST=None


Review URL: https://chromiumcodereview.appspot.com/11106019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162066 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-16 03:40:57 +00:00
raymes@chromium.org
e1f5c9beb4 Converted PluginResource reply message handling to use base::Callback
Previously each PluginResource had to write a reply handler (|OnReplyReceived|) for any replies to resource messages. This approach had several problems including the fact that the PluginResource had to track the state of any outstanding calls.

This change allows you to register a base::Callback when calling CallToBrowser/CallToRenderer. The callback will be run when a reply message is received with a sequence number matching the call. The parameters of the reply will be passed to the callback. An example of usage:

CallBrowser<PpapiPluginMsg_MyResourceType_MyReplyMessage>(
    PpapiHostMsg_MyResourceType_MyRequestMessage(),
    base::Bind(&MyPluginResource::ReplyHandler, this));

If a reply message to this call is received whose type does not match the expected reply message (for example, in the case of an error), the callback will still be invoked but with the default values of the message parameters.


BUG=


Review URL: https://chromiumcodereview.appspot.com/11022005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160015 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-04 00:07:44 +00:00
brettw@chromium.org
00c0d0437c Implement the gamepad API in the IPC proxy
This does some reworking of the gamepad system to make it possible to hook in (previously it assumed that it was only talking to renderers) and I did some cleanup. Gamepad files were renamed to match the classes, and I did a bunch of test infrastructure work.

IMPORTANT BEHAVIOR CHANGE: This changes the Web gamepad API to report all gamepad data as soon as any of them are interacted with. This is what we need to do for Pepper anyway (since it gets all or none of the share memory) and I think makes more sense for most consumers anyway.

I separated out the user gesture detection code into a place where it can be used in the browser process as well, and exposed functionality in the gamepad provider to be notified when a user gesture happens.

The existing gamepad test was disabled and had bitrotted. This fixes it.

Review URL: https://chromiumcodereview.appspot.com/10912062

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155676 0039d316-1c4b-4281-b951-d872f2087c98
2012-09-10 07:06:39 +00:00
brettw@chromium.org
f511881bed Add a skeleton gamepad resource.
This implements the skeleton of the gamepad resource for the IPC proxy. It is not actually hooked up. Hooking it up will require moving some gamepad lock code to a shared location.

This also hooks up the browser message routing for implementing resource hosts in the browser process.

BUG=

Review URL: https://chromiumcodereview.appspot.com/10824272

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153265 0039d316-1c4b-4281-b951-d872f2087c98
2012-08-24 19:54:30 +00:00