0
Commit Graph

30 Commits

Author SHA1 Message Date
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
94f57fe3c8 Use override keyword in ppapi::proxy::InterfaceProxy.
Instead of virtual, since it inherits from IPC::Sender.
Do the same for child classes and fix lint errors.

Change-Id: Ie01bdd94d0606ce5d2f9e38e08707224c477ac91
Reviewed-on: https://chromium-review.googlesource.com/642461
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498678}
2017-08-30 23:58:24 +00:00
3fc7042061 ppapi: Cleanup class/struct forward declarations
Remove useless class and struct forward declarations, and add
missing ones in ppapi header files.

BUG=662195

Review-Url: https://codereview.chromium.org/2539033005
Cr-Commit-Position: refs/heads/master@{#436167}
2016-12-03 20:53:35 +00:00
ced9224fbb Convert //ppapi to use std::unique_ptr
BUG=554298
R=bbudge@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#385591}
2016-04-07 00:01:36 +00:00
47cb253f15 Implementation of URLLoader using PluginResource/ResourceHost.
This change is essentially the same as:  https://codereview.chromium.org/11416363
Here's the description from that CL:

"This doesn't use the resource call/reply infrastructure, but rather pipes WebKit callbacks to the
plugin via unsolicited callbacks. This eliminates state tracking in the host which makes things
simpler.

This fixes some bugs in Close() as well to fix the below-mentioned bug."
Other things contained in the original CL:

- Add a GetPluginPID method to RendererPpapiHost. This is needed when the loader host Opens()
a request.

- Add a HandleDocumentLoad method to PluginDelegate and implements it in PepperPluginDelegateImpl.
This creates the host for both in- and out-of-process proxies.

- Removes the GetURLLoaderBufferedBytes function from the PPB_Proxy_Private interface.

- Removes the HandleDocumentLoad implementation in the PPP_Instance_Proxy class.

- Removes the document_loader_ field from webkit::ppapi::WebPluginImpl and changes the
implementation to forward document load notifications to the PluginInstance.

- Changes the PluginInstance to manage the document loader.

This CL differs from the original in two ways.

First, the trusted interface keeps the RegisterStatusCallback function. The NaCl plugin relies on
this to generate progress messages back to the embedding page.

Second, PluginInstance is changed to recognize when it's a NaCl instance, and to defer calling
the plugin delegate's HandleDocumentLoad method until after the proxy is switched. In the meantime,
it saves document events in a special loader object. When the proxy is switched, the delegate's
HandleDocumentLoad method is called and the response and document events are then replayed
through the new loader resource.

BUG=69457
R=brettw@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200412 0039d316-1c4b-4281-b951-d872f2087c98
2013-05-16 01:50:40 +00:00
e8f07ac77c Change the DidChangeView update to take a new ViewChanged resource.
This will allow us to be more flexible about adding data to view changed updates in the future. For now, I've incorporated fullscreen and tab foreground state into the view state.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8951014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116142 0039d316-1c4b-4281-b951-d872f2087c98
2012-01-03 17:43:36 +00:00
0a6d5f653a Cleanup: Remove unneeded forward declarations in ppapi.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8527020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109595 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-11 08:04:07 +00:00
06e0a34ae1 Add PPB_Fullscreen_Dev;0.5. Keep 0.4 for backwards compatiblity and point it
to PPB_FlashFullscreen. The new implementation is based on
http://codereview.chromium.org/7714017/ with some bug fixes.
Update header comments.

Main API differences between the old and the new implementation:
- transition from fullscreen is now asynchronous and ends at DidChangeView
just like transition to fullscreen; graphics devices cannot be bound during
the transition.
- when switching to/from fullscreen 3D resources no longer need to be
re-created.
- transitions to fullscreen are only possible when processing user user gestures.
- transition to fullscreen results in 2 DidChangeViews, one for moving the
plugin to the middle of the window and one for stretching the window and
placing the plugin in the middle of the screen.
- the size of the plugin is not changed when going to/from fullscreen.

Testing:
- Mapped ppapi_tests:test_fullscreen to ppapi_tests:test_flash_fullscreen.
- Updated test_fullscreen to work with the new implementation. To be testable
automatically this needs enhancements to the testing infrastructure
for generating user gestures. For now marked the test as DISABLED.
- Disabled NaCl's ppapi_ppb_fullscreen_browser_test for the same reasons
as above.
- To re-enable both tests, we will first need to add user gesture capabilites
to PPB_Testing.
- Build 0.4 ppapi_test:test_fullscreen and ran this out of process and in
process with the newly build revision of chrome to verify backwards
compatability.
- In a separate CL, will update NaCl's ppapi_ppb_fullscreen_browser_test to work
with the new implementation, for now only manually.

BUG=41780
TEST=see above
Review URL: http://codereview.chromium.org/7826017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102888 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-27 04:24:30 +00:00
5c96602763 s patch tries to remove most of the manual registration for Pepper interfaces, and replaces it with a list of macros. When files want to know which Pepper interface names and structs there are, they define what they want to do with the macros, and then include the relevant files for the classes of interfaces they want (stable, private, dev).
This re-lands my previous change.
Original Review URL: http://codereview.chromium.org/7874002

This does not convert all the dev interfaces. I just did a few to keep the patch smaller. So there is still a lot of manual registration.

This fixes the previous design problem where we assumed one *_Proxy object == one interface. We have been hacking around this lately with duplicate GetInfo calls, but this doesn't work for PPP interfaces.

Now, a _Proxy object is just there to help keep things organized. One proxy can handle zero, one, or many interfaces, and this mapping is controlled by just one line in the interfaces file.

So for example, to add a new function to a new version of an interface with backward compatibility, you would add that function to the _api.h file, and write a thunk for the new interface. Then you only need to add one line to the interfaces_ppb_public_stable.h file and that will be hooked up with the proxy and the implementation.

This removes some _proxy objects/files that were used only to declare that the interfaces existed, since they're no longer necessary.

I folded Console into the Instance API which removed a bunch of code.

I removed FileChooser 0.4. I think everybody has converted to the new one, and I think parts of it weren't even hooked up properly anymore.
Review URL: http://codereview.chromium.org/7887001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100936 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-13 18:09:37 +00:00
37fe036a2c Revert r100853, 100851. Win_shared build is broken.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100854 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-13 04:00:33 +00:00
7937c488c7 This patch tries to remove most of the manual registration for Pepper interfaces, and replaces it with a list of macros. When files want to know which Pepper interface names and structs there are, they define what they want to do with the macros, and then include the relevant files for the classes of interfaces they want (stable, private, dev).
This re-lands my previous change.
Original Review URL: http://codereview.chromium.org/7740038

This does not convert all the dev interfaces. I just did a few to keep the patch smaller. So there is still a lot of manual registration.

This fixes the previous design problem where we assumed one *_Proxy object == one interface. We have been hacking around this lately with duplicate GetInfo calls, but this doesn't work for PPP interfaces.

Now, a _Proxy object is just there to help keep things organized. One proxy can handle zero, one, or many interfaces, and this mapping is controlled by just one line in the interfaces file.

So for example, to add a new function to a new version of an interface with backward compatibility, you would add that function to the _api.h file, and write a thunk for the new interface. Then you only need to add one line to the interfaces_ppb_public_stable.h file and that will be hooked up with the proxy and the implementation.

This removes some _proxy objects/files that were used only to declare that the interfaces existed, since they're no longer necessary.

I folded Console into the Instance API which removed a bunch of code.

I removed FileChooser 0.4. I think everybody has converted to the new one, and I think parts of it weren't even hooked up properly anymore.
Review URL: http://codereview.chromium.org/7874002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100851 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-13 03:31:30 +00:00
c77a8dd4b8 Revert 100748 - This patch tries to remove most of the manual registration for Pepper interfaces, and replaces it with a list of macros. When files want to know which Pepper interface names and structs there are, they define what they want to do with the macros, and then include the relevant files for the classes of interfaces they want (stable, private, dev).
This does not convert all the dev interfaces. I just did a few to keep the patch smaller. So there is still a lot of manual registration.

This fixes the previous design problem where we assumed one *_Proxy object == one interface. We have been hacking around this lately with duplicate GetInfo calls, but this doesn't work for PPP interfaces.

Now, a _Proxy object is just there to help keep things organized. One proxy can handle zero, one, or many interfaces, and this mapping is controlled by just one line in the interfaces file.

So for example, to add a new function to a new version of an interface with backward compatibility, you would add that function to the _api.h file, and write a thunk for the new interface. Then you only need to add one line to the interfaces_ppb_public_stable.h file and that will be hooked up with the proxy and the implementation.

This removes some _proxy objects/files that were used only to declare that the interfaces existed, since they're no longer necessary.

I folded Console into the Instance API which removed a bunch of code.

I removed FileChooser 0.4. I think everybody has converted to the new one, and I think parts of it weren't even hooked up properly anymore.

Review URL: http://codereview.chromium.org/7740038

TBR=brettw@chromium.org
Review URL: http://codereview.chromium.org/7844018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100754 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-12 20:37:04 +00:00
62cccdac42 This patch tries to remove most of the manual registration for Pepper interfaces, and replaces it with a list of macros. When files want to know which Pepper interface names and structs there are, they define what they want to do with the macros, and then include the relevant files for the classes of interfaces they want (stable, private, dev).
This does not convert all the dev interfaces. I just did a few to keep the patch smaller. So there is still a lot of manual registration.

This fixes the previous design problem where we assumed one *_Proxy object == one interface. We have been hacking around this lately with duplicate GetInfo calls, but this doesn't work for PPP interfaces.

Now, a _Proxy object is just there to help keep things organized. One proxy can handle zero, one, or many interfaces, and this mapping is controlled by just one line in the interfaces file.

So for example, to add a new function to a new version of an interface with backward compatibility, you would add that function to the _api.h file, and write a thunk for the new interface. Then you only need to add one line to the interfaces_ppb_public_stable.h file and that will be hooked up with the proxy and the implementation.

This removes some _proxy objects/files that were used only to declare that the interfaces existed, since they're no longer necessary.

I folded Console into the Instance API which removed a bunch of code.

I removed FileChooser 0.4. I think everybody has converted to the new one, and I think parts of it weren't even hooked up properly anymore.

Review URL: http://codereview.chromium.org/7740038

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100748 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-12 20:07:29 +00:00
4d2efd2e10 Convert the pp::proxy namespace to the ppapi::proxy namespace.
This is more consistent with the stuff in shared_impl, and removes a lot of
namespace using goop.

Add a unified resource tracker shared between the proxy and the impl.

This renames the old ResourceObjectBase to Resource and removes the old
PluginResource. It moves the resource tracker from the impl to the
shared_impl, and makes the proxy use it.

Some things become a little less neat because there's no proxy resource base
class. In particular GetDispatcher() is now gone. I considered whether to
add a helper base class that provides this function, but decided against it
and had individual resource classes implement this when their implementation
would find it useful. This is because ultimately I want more of this
functionality to move into the shared_impl, and it's easier to do that if
there are fewer proxy-specific things in the resources.

This changes the way that plugins are added to the tracker. Previously they
would only be in the tracker if the plugin had a reference to them, although
they could be alive if the impl had a scoped_ptr referencing an object. This
actually has the bug that if we then give the resource back to the plugin,
it wouldn't be refcounted properly and everything would get confused.

Now the tracker tracks all live resource objects whether or not the plugin
has a ref. This works basically like the var tracker (it would be nice if
the var and resource trackers shared more code, but that would further
complicate this already overcomplicated patch). The resource tracker takes an
extra ref whenever the plugin has one or more, and otherwise just tracks live
resources.

BUG=
TEST=

Review URL: http://codereview.chromium.org/7655002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97367 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-18 21:58:02 +00:00
be0a84b5a8 Move host resource from the proxy to the shared_impl.
This is needed by my new unified resoruce tracker, which will use this file from the shared_impl in the new resource base object.

I fixed up the namespaces for the callers. Longer term, I want to put the
proxy in the ppapi namespace which will eliminate some of this mess.

Review URL: http://codereview.chromium.org/7623018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96678 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-13 04:18:44 +00:00
13a8f49815 Reland http://codereview.chromium.org/7452002/ again
Update chromoting input events. (Clang caught this. Thanks, Clang!)

Note I'm leaving in temporary backwards-compatibility.

BUG=None
TEST=ppapi tests
TBR=brettw,sergeyu

Review URL: http://codereview.chromium.org/7466008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93234 0039d316-1c4b-4281-b951-d872f2087c98
2011-07-20 19:55:39 +00:00
38d035e33f Revert 93223 - Reland http://codereview.chromium.org/7452002/
Update chromoting input events. (Clang caught this. Thanks, Clang!)

Note I'm leaving in temporary backwards-compatibility.

brettw, just need a rubber-stamp. This is the same as the last CL. awong/garykac/sergeyu, looking for someone on chromoting team to glance at my changes and make sure I didn't do anything you don't like. This is a high priority for 14, so please look if you can.

BUG=None
TEST=ppapi tests

Review URL: http://codereview.chromium.org/7466002

TBR=dmichael@chromium.org
Review URL: http://codereview.chromium.org/7471006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93229 0039d316-1c4b-4281-b951-d872f2087c98
2011-07-20 18:53:59 +00:00
a19358d3fc Reland http://codereview.chromium.org/7452002/
Update chromoting input events. (Clang caught this. Thanks, Clang!)

Note I'm leaving in temporary backwards-compatibility.

brettw, just need a rubber-stamp. This is the same as the last CL. awong/garykac/sergeyu, looking for someone on chromoting team to glance at my changes and make sure I didn't do anything you don't like. This is a high priority for 14, so please look if you can.

BUG=None
TEST=ppapi tests

Review URL: http://codereview.chromium.org/7466002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93223 0039d316-1c4b-4281-b951-d872f2087c98
2011-07-20 18:11:51 +00:00
d153c80959 Revert 93202 - Remove HandleInputEvent from PPP_Instance and freeze to 1.0.
Note I'm leaving in temporary backwards-compatibility.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2035
TEST=ppapi tests

Review URL: http://codereview.chromium.org/7452002

TBR=dmichael@chromium.org
Review URL: http://codereview.chromium.org/7467002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93208 0039d316-1c4b-4281-b951-d872f2087c98
2011-07-20 16:36:02 +00:00
61e3ef3a32 Remove HandleInputEvent from PPP_Instance and freeze to 1.0.
Note I'm leaving in temporary backwards-compatibility.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=2035
TEST=ppapi tests

Review URL: http://codereview.chromium.org/7452002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93202 0039d316-1c4b-4281-b951-d872f2087c98
2011-07-20 16:03:38 +00:00
657f4efd9e Remove untrusted scripting support.
BUG=82606
TEST=ppapi_tests,ppapi_unittests

Review URL: http://codereview.chromium.org/7362012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92557 0039d316-1c4b-4281-b951-d872f2087c98
2011-07-14 16:39:23 +00:00
912f3d6c21 Make o.o.p. proxy handle PPP_Instance versions 0.4 and 0.5.
Move & tweak PPP_Instance_Combined to ppapi_shared so the proxy can use it.  Use versioned PPP_Instance types only.

BUG=82606
TEST=run tests o.o.p.

Review URL: http://codereview.chromium.org/7189045

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90984 0039d316-1c4b-4281-b951-d872f2087c98
2011-06-29 18:26:36 +00:00
6a160e7875 Pass fullscreen state along with DidChangeView to avoid sync messages
BUG=none
TEST=NYTimes with Pepper Flash, check that video still plays while scrolling.

Review URL: http://codereview.chromium.org/6923001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84112 0039d316-1c4b-4281-b951-d872f2087c98
2011-05-04 20:23:45 +00:00
465faa2904 Rent syncemove all uses of the global Dispatcher Get function.
This reqired reworking how plugin->host GetInterface works. Previously,
interface requests were symmetric where each side would first do a
SupportsInterface to see if the remote side supports the interface, then create
the proxy. Since the plugin may talk to multiple renderers, we don't know where
to send these requests. The solution is to make the assumption that the
renderer always supports all PPB interfaces (which is possible since the proxy
is compiled with the executable).

This also adds some better lookup for interfaces to avoid having multiple lists
of interfaces. We now have a list of interfaces and factory functions in
dispatcher.cc.

Add some additional testing infrastructure for the dispatchers with simple tests.
Review URL: http://codereview.chromium.org/6286070

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74121 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-08 16:31:46 +00:00
f24448db9f Refactor PPAPI proxy resource handling to maintain which host they came from,
and to map back to that host when calling functions on them. Adds a mapping
between resources generated by the hosts to a new list inside the plugin so
there can't be overlaps.

This means there are now two meanings for a PP_Resource, one in the plugin
process and one in the host process. This is potentially very confusing. I
introduced a new object called a HostResource that always represents a
"host" PP_Resource to try to prevent errors. In the plugin side of the proxy,
it only deals with PP_Resources valid in the plugin, and SerializedResources
valid in the host. It also encapsulates the associated instance, which
simplifies some code.

Each PluginResource object maintains its SerializedResource which the proxy
uses to send to the host for requests. This requires getting the PluginResource
object in more proxy calls.

This fixes a bug in var sending introduced in my previous patch. The var
releasing from EndSendPassRef used the host var rather than the plugin var. I
had to add more plumbing to get the dispatcher at this location and convert
to a plugin var.

I removed the separate file for ImageData and put it in ppb_image_data_proxy
like for the other resource types.

TEST=some unit tests included
BUG=none
Review URL: http://codereview.chromium.org/6334016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72879 0039d316-1c4b-4281-b951-d872f2087c98
2011-01-27 20:40:39 +00:00
a95986a837 Make IPC::Channel::Listener:OnMessageReceived have a return value indicating whether a message was processed or not.
TBR=brettw
Review URL: http://codereview.chromium.org/5978003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70139 0039d316-1c4b-4281-b951-d872f2087c98
2010-12-24 06:19:28 +00:00
19d2b0155d Convert Chrome PPAPI proxy from bool to PP_Bool.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/4659001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65381 0039d316-1c4b-4281-b951-d872f2087c98
2010-11-08 16:32:18 +00:00
4c2e935b2b Instance interface implementation. These don't build by themselves, this is
part of a larger patch. You can see most of the serialization mechanics already
checked in to the same directory.

TEST=none
BUG=none
Review URL: http://codereview.chromium.org/4289005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65260 0039d316-1c4b-4281-b951-d872f2087c98
2010-11-05 22:13:02 +00:00
1a4d9cb51c Revert PPAPI proxy change with too many files in it.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64870 0039d316-1c4b-4281-b951-d872f2087c98
2010-11-03 03:13:01 +00:00
4bcab1c571 Core PPAPI proxy files. This includes the dispatcher which is the control point
on each end of the IPC channel. It includes the IPC message definitions. It
also includes the base class for the interface proxying, and the core resource
and var tracking.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/4229002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64869 0039d316-1c4b-4281-b951-d872f2087c98
2010-11-03 03:10:13 +00:00