0
Commit Graph

27 Commits

Author SHA1 Message Date
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
Hans Wennborg
c245a7f1b6 Remove/replace unnecessary includes of logging.h (ppapi/)
If the file just needs the CHECK/CHECK_OP/NOTREACHED
macros, use the appropriate header for that instead.
Or if logging.h is not needed at all, remove it.

This is both a nice cleanup (logging.h is a big header,
and including it unnecessarily has compile-time costs),
and part of the final step towards making logging.h no
longer include check.h and the others.

Bug: 1031540
Change-Id: I36a2cdc31d2b641f3ba3d13cefcdaa9d942ed9ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2254126
Commit-Queue: Bill Budge <bbudge@chromium.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780456}
2020-06-19 21:39:34 +00:00
avi
e029c4134f Switch to standard integer types in ppapi/.
BUG=138542
TBR=bbudge@chromium.org
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#366718}
2015-12-23 06:46:20 +00:00
teravest@chromium.org
d4edb10981 Add Query() support to FileRef.
This change brings Query() support back to FileRef for in-process and out-of-process plugins.
    
I've added testing for a file that exists and one that doesn't.
    
BUG=170721


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191805 0039d316-1c4b-4281-b951-d872f2087c98
2013-04-02 09:10:41 +00:00
dmichael@chromium.org
aed965375d PPAPI: Make blocking completion callbacks work.
This also makes scoped_refptr<TrackedCallback> the "new" way to pass completion callbacks in an API. This allows the Enter object to handle checking for blocking callbacks on the main thread to report error, and blocking if on the background thread. This way, interfaces don't have to write any special cases for blocking callbacks.

When built with enable_pepper_threading=1 locally, URLLoader tests all pass for blocking completion callbacks. I haven't updated all tests yet.

BUG=92909
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143806 0039d316-1c4b-4281-b951-d872f2087c98
2012-06-23 14:27:42 +00:00
brettw@chromium.org
4f2006122f Delete FunctionGroupBase from Pepper.
The FunctionGroupBase stuff was intended to used for our manual RTTI for
interfaces not associated with resources. However, we've been putting most
of those interfaces on the PPB_Instance_API which allows us to skip a
whole lot of routing, setup, and boilerplate code.

This patch moves the two remaining classes deriving from FunctionGroupBase
and moves them to special getters on the globals class. We'll keep these
classes around and since there are only two, it seems to warrant the special
case.

BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134509 0039d316-1c4b-4281-b951-d872f2087c98
2012-04-30 05:13:17 +00:00
brettw@chromium.org
11f515acdd New file chooser interface that uses the new PP_ArrayOutput feature. This also changes PP_ArrayOutput to be pass-by-value.
This keeps backwards compat for the old interface. It fixes some bugs in the callback system that I found when working on the patch and adds some new machinery for doing array output in the proxy. It also re-enables the file chooser feature which was recently broken.

BUG=118857

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129022 0039d316-1c4b-4281-b951-d872f2087c98
2012-03-26 22:21:59 +00:00
thestig@chromium.org
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
brettw@chromium.org
0f41c011f5 Revert 106717 - Revert 106677 (caused several PPAPI test timeouts, see http://crbug.com/101154)
- Remove the proxy callback tracker.

This doesn't properly delete callbacks when the corresponding resource goes
away. This can lead to leaks or crashes in the plugin when the callback is
triggered unexpectedly.

BUG=http://crbug.com/86279

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

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

TBR=thakis@chromium.org
Review URL: http://codereview.chromium.org/8371008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106764 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-21 19:49:20 +00:00
thakis@chromium.org
5732c7cfea Revert 106677 (caused several PPAPI test timeouts, see http://crbug.com/101154)
- Remove the proxy callback tracker.

This doesn't properly delete callbacks when the corresponding resource goes
away. This can lead to leaks or crashes in the plugin when the callback is
triggered unexpectedly.

BUG=http://crbug.com/86279

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106717 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-21 14:24:31 +00:00
brettw@chromium.org
645ef96b90 Remove the proxy callback tracker.
This doesn't properly delete callbacks when the corresponding resource goes
away. This can lead to leaks or crashes in the plugin when the callback is
triggered unexpectedly.

BUG=http://crbug.com/86279

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106677 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-21 04:41:59 +00:00
brettw@chromium.org
794d83cda5 Add a new globals object for PPAPI tracking information.
[ Reland of 106142: http://codereview.chromium.org/8316008 ]

This adds a specialization on the host and plugin side of the proxy. This
replaces the ad-hoc singleton tracking done by the resource and var trackers
with just being getters on this global object.

Most code can use the single PpapiGlobals class. I also allow code to get the
host and plugin specializations since some code needs access to some specific
features of each side.

In a later pass I'll move the other stuff out of TrackerBase and delete it.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106537 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-20 19:09:20 +00:00
sail@chromium.org
faa2a45bf3 Revert 106142 - Add a new globals object for PPAPI tracking information.
This adds a specialization on the host and plugin side of the proxy. This
replaces the ad-hoc singleton tracking done by the resource and var trackers
with just being getters on this global object.

Most code can use the single PpapiGlobals class. I also allow code to get the
host and plugin specializations since some code needs access to some specific
features of each side.

In a later pass I'll move the other stuff out of TrackerBase and delete it.

TEST=none
BUG=none

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106148 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-18 22:16:26 +00:00
brettw@chromium.org
77ac44f19b Add a new globals object for PPAPI tracking information.
This adds a specialization on the host and plugin side of the proxy. This
replaces the ad-hoc singleton tracking done by the resource and var trackers
with just being getters on this global object.

Most code can use the single PpapiGlobals class. I also allow code to get the
host and plugin specializations since some code needs access to some specific
features of each side.

In a later pass I'll move the other stuff out of TrackerBase and delete it.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106142 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-18 21:57:50 +00:00
brettw@chromium.org
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
brettw@chromium.org
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
brettw@chromium.org
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
dmazzoni@chromium.org
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
brettw@chromium.org
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
brettw@chromium.org
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
brettw@chromium.org
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
brettw@chromium.org
79d23c7eca Reland 95309. Add a template to handle properly issuing completion callbacks.
This fixes some bugs where we forgot to issue completion callbacks in some
error cases in the proxy, and cleans up the cases that were already doing this
properly.

This removes the PPB_AudioTrusted_API and folds those functions into the
regular Audio API. I'm trying to merge more things to have a smaller explosion
of APIs and the boilerplate associated with them.
Original review URL: http://codereview.chromium.org/7551032
Review URL: http://codereview.chromium.org/7585025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95859 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-08 19:40:40 +00:00
brettw@chromium.org
73b6188132 Revert 95309 - I need to fix some bugs with this.
Add a template to handle properly issuing completion callbacks. This fixes
some bugs where we forgot to issue completion callbacks in some error cases
in the proxy, and cleans up the cases that were already doing this properly.

This removes the PPB_AudioTrusted_API and folds those functions into the
regular Audio API. I'm trying to merge more things to have a smaller explosion
of APIs and the boilerplate associated with them.
Review URL: http://codereview.chromium.org/7551032

TBR=brettw@chromium.org

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95342 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-03 22:44:58 +00:00
brettw@chromium.org
0609474310 Add a template to handle properly issuing completion callbacks. This fixes
some bugs where we forgot to issue completion callbacks in some error cases
in the proxy, and cleans up the cases that were already doing this properly.

This removes the PPB_AudioTrusted_API and folds those functions into the
regular Audio API. I'm trying to merge more things to have a smaller explosion
of APIs and the boilerplate associated with them.
Review URL: http://codereview.chromium.org/7551032

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95309 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-03 20:52:20 +00:00
brettw@chromium.org
cd910b9316 Convert more interfaces to the new thunk system. This goes up to and including
the ones starting with "F".

Since this adds a lot more interfaces, I added the macro stuff we used for the
old system to generate the various template specializations. This involded a
lot of renaming since the As* needs to match the name (I was previously leaving
off the "PPB_" part). I did other misc cleanup to the infrastructure.
Review URL: http://codereview.chromium.org/7082036

Reland 87415
Review URL: http://codereview.chromium.org/7105013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87444 0039d316-1c4b-4281-b951-d872f2087c98
2011-06-01 07:19:31 +00:00
thestig@chromium.org
4697f72f5b Revert 87415 - Convert more interfaces to the new thunk system. This goes up to and including
the ones starting with "F".

Since this adds a lot more interfaces, I added the macro stuff we used for the
old system to generate the various template specializations. This involded a
lot of renaming since the As* needs to match the name (I was previously leaving
off the "PPB_" part). I did other misc cleanup to the infrastructure.
Review URL: http://codereview.chromium.org/7082036

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87438 0039d316-1c4b-4281-b951-d872f2087c98
2011-06-01 05:51:27 +00:00
brettw@chromium.org
1598e4a9f0 Convert more interfaces to the new thunk system. This goes up to and including
the ones starting with "F".

Since this adds a lot more interfaces, I added the macro stuff we used for the
old system to generate the various template specializations. This involded a
lot of renaming since the As* needs to match the name (I was previously leaving
off the "PPB_" part). I did other misc cleanup to the infrastructure.
Review URL: http://codereview.chromium.org/7082036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87415 0039d316-1c4b-4281-b951-d872f2087c98
2011-06-01 02:12:55 +00:00