0
Commit Graph

38 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
Peter Boström
5666ff4f50 Remove most remaining unused "base/macros.h"
Removes `#include "base/macros.h"` from remaining .cc, .h and .mm files
that do not contain `ignore_result(` and do not trigger pre-commit or
pre-upload errors.

Bug: 1010217
No-Try: true
Change-Id: I4cc5207b3deafa7901764d2e633bbb1ad43cfb73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3276692
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#941054}
2021-11-12 03:40:24 +00:00
Peter Boström
3d5b3cbc71 Replace DISALLOW_COPY_AND_ASSIGN in ppapi/
This replaces DISALLOW_COPY_AND_ASSIGN with explicit constructor deletes
where a local script is able to detect its insertion place (~Foo() is
public => insert before this line).

This is incomplete as not all classes have a public ~Foo() declared, so
not all DISALLOW_COPY_AND_ASSIGN occurrences are replaced.

IWYU cleanup is left as a separate pass that is easier when these macros
go away.

Bug: 1010217
Change-Id: Iab44b67c7ca86cf5cfb1f6b27de5c18769d36632
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3177680
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#924479}
2021-09-23 21:35:45 +00:00
Hans Wennborg
708fa82298 Remove/replace unnecessary logging.h includes in .cc files (ppapi)
CHECK, CHECK_EQ etc., and NOTREACHED/NOTIMPLEMENTED have moved
to the much smaller headers check.h, check_op.h, and notreached.h,
respectively.

This CL updates .cc files to use those headers instead when
possible, with the purpose of saving compile time.

(Split out from https://crrev.com/c/2164525 which also has
notes on how the change was generated.)

Bug: 1031540
Change-Id: I59620a4eb8a4c2096bcc75f546d03cd7f9455aa7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2165109
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@{#762906}
2020-04-27 17:23:15 +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
nick
e478443485 Update {virtual,override} to follow C++11 style in ppapi.
The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override.

This patch was manually generated using a regex and a text editor.

BUG=417463

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

Cr-Commit-Position: refs/heads/master@{#326505}
2015-04-23 14:02:23 +00:00
brettw
669d47b1bf Enable size_t to int truncation warnings in PPAPI
Also removed a few extra "-Wpedantic" warnings in ppapi_cpp. I don't see a good justification why this should be different than the rest of the project.

Fix GN error in media.

NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#316289}
2015-02-13 21:18:03 +00:00
kareng
1c62eeb196 Revert of PPAPI: Make GetProxiedInterface not re-enter the plugin (patchset id:20001 of https://codereview.chromium.org/704913002/)
Reason for revert:
reverted due to 431529

Original issue's description:
> PPAPI: Make GetProxiedInterface not re-enter the plugin
>
> It's important that we never re-enter the plugin when it is blocked on
> synchronous calls to the renderer (unless they are scripting messages, which
> have to be re-entrant). This especially breaks assumptions in OpenGL usage.
>
> This required making the plugin side of the PPB_VideoDecoder_Dev proxy check
> for the interface prior to sending its synchronous Create message. I audited
> all the other uses of GetProxiedInterface from the renderer, and none of the
> others happen as a result of a sync plugin->renderer message.
>
> I also renamed the existing "SupportsInterface" message to "IsInterfaceSupported" to make the intent more obvious, and because I liked the SupportsInterface name better for the new usage: Telling the renderer that an interface is supported.
>
> BUG=418651
>
> Committed: https://crrev.com/a17de8faa97ca33d1e58e08392dbdc3e316d6cbe
> Cr-Commit-Position: refs/heads/master@{#303247}

TBR=teravest@chromium.org,tsepez@chromium.org,piman@chromium.org,dmichael@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=418651

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

Cr-Commit-Position: refs/heads/master@{#303388}
2014-11-08 16:35:30 +00:00
dmichael
a17de8faa9 PPAPI: Make GetProxiedInterface not re-enter the plugin
It's important that we never re-enter the plugin when it is blocked on
synchronous calls to the renderer (unless they are scripting messages, which
have to be re-entrant). This especially breaks assumptions in OpenGL usage.

This required making the plugin side of the PPB_VideoDecoder_Dev proxy check
for the interface prior to sending its synchronous Create message. I audited
all the other uses of GetProxiedInterface from the renderer, and none of the
others happen as a result of a sync plugin->renderer message.

I also renamed the existing "SupportsInterface" message to "IsInterfaceSupported" to make the intent more obvious, and because I liked the SupportsInterface name better for the new usage: Telling the renderer that an interface is supported.

BUG=418651

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

Cr-Commit-Position: refs/heads/master@{#303247}
2014-11-07 17:18:14 +00:00
mostynb
699af3cc7b replace OVERRIDE and FINAL with override and final in ppapi/
R=dmichael@chromium.org,dcheng@chromium.org
BUG=417463

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

Cr-Commit-Position: refs/heads/master@{#298269}
2014-10-06 18:03:57 +00:00
bbudge@chromium.org
4ba60db044 Rename some PPB_VideoDecoder_Dev implementation types.
Adds a "_Dev" suffix to some types that would collide with
upcoming public VideoDecoder API.

BUG=281689

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268450 0039d316-1c4b-4281-b951-d872f2087c98
2014-05-06 07:08:19 +00:00
ananta@chromium.org
6013c798ad Ensure that pepper plugins honor the GPU H/W video decode blacklist and the disable-accelerated-video-decode switch
Pepper plugins like Flash should honor the GPU blacklist. Not doing that causes them to
try and use buggy video drivers for video decoding which does not end well.

This is done by adding a flag in the accelerated_video_decode_enabled in the WebPreferences structure
This is initialized along with the other preferences in the GpuDataManagerImplPrivate::UpdateRendererWebPrefs
function. This is also passed to PPAPI plugins via the ppapi::Preferences structure.
The flag defaults to false. The plugin process checks this flag and if it is false does
not attempt to create the video decoder.

BUG=348154
R=bbudge@chromium.org, cpu@chromium.org, jam@chromium.org, jamesr@chromium.org, jbauman@chromium.org, palmer@chromium.org, bbudge, cpu, jbauman

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255473 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-07 00:18:33 +00:00
scherkus@chromium.org
a2f53dccfd ppapi: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST.
It's no longer providing value as the MSVC warning is disabled during compilation. Refer to bug for details.

NOTE: This doesn't address PP_ALLOW_THIS_IN_INITIALIZER_LIST.

BUG=234765
R=brettw@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197205 0039d316-1c4b-4281-b951-d872f2087c98
2013-04-30 01:06:35 +00:00
danakj@chromium.org
c1e77f1abf Flash: Don't lose references to the Graphics3D from the VideoDecoder.
When the Flash VideoDecoder is destroyed, it needs to drop the reference
it holds on the Graphics3D object.

Currently, the Destroy() method erases the id for the Graphics3D object
before trying to drop its reference, making the drop a no-op and leaking
the reference.

Also, if the PPB_VideoDecoder_Impl object fails to initialize and create
a platform_video_decoder_, it still holds onto its reference to the
Graphics3D since it does not call Destroy() even though it called
InitCommon() on the PPB_VideoDecoder_Shared base class.

Lastly, when the plugin proxy's VideoDecoder class is destroyed, it
should ensure that the base class' Destroy() has been called so that
its reference is not leaked.

BUG=chrome-os-partner:18331


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191176 0039d316-1c4b-4281-b951-d872f2087c98
2013-03-28 18:12:04 +00:00
cevans@chromium.org
b31199ef64 Fix some types at the IPC layer. Sizes should be unsigned.
BUG=164958
Review URL: https://codereview.chromium.org/11474040

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172474 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-12 00:48:29 +00:00
brettw@chromium.org
17cd29ad16 Merge branch 'master' into perms_video
Hook up PPAPI permissions for video interfaces

This is a reland of part of r167727.

Original review URL: https://codereview.chromium.org/11365235
R=raymes

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168017 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-15 20:43:23 +00:00
brettw@chromium.org
453d5306f7 Revert 167727 - Add PPAPI permissions for file chooser, PDF, testing, video capture, and video decode.
Review URL: https://codereview.chromium.org/11365235

TBR=brettw@chromium.org
Review URL: https://codereview.chromium.org/11358247

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167754 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-14 21:53:54 +00:00
brettw@chromium.org
27e0c2aed5 Add PPAPI permissions for file chooser, PDF, testing, video capture, and video decode.
Review URL: https://codereview.chromium.org/11365235

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167727 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-14 20:26:04 +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
614888b731 Convert ppapi/shared to use TrackedCallback.
Convert all classes in ppapi/shared_impl to use the new shared TrackedCallback
class for the PP_CompletionCallbacks.

This required a few changes to some shared objects to make them resources.

BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116467 0039d316-1c4b-4281-b951-d872f2087c98
2012-01-05 06:18:12 +00:00
brettw@chromium.org
9a57839249 Rename the shared_impl resource files to give them more regular names.
[ Reland of 113290 http://codereview.chromium.org/8790004 ]

I keep getting confused between things like AudioImpl and PPB_Audio_Impl. This uses _shared for the names, so now we have _impl, _proxy, and _shared which makes more sense.

I also removed the ppb_opengles2_impl file since it was just a forward to the shared version.
Review URL: http://codereview.chromium.org/8849003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113428 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-07 18:59:27 +00:00
brettw@chromium.org
56d7ad4223 Revert 113290 - Rename the shared_impl resource files to give them more regular names.
I keep getting confused between things like AudioImpl and PPB_Audio_Impl. This uses _shared for the names, so now we have _impl, _proxy, and _shared which makes more sense.

I also removed the ppb_opengles2_impl file since it was just a forward to the shared version.

BUG=
TEST=

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113302 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-07 00:01:30 +00:00
brettw@chromium.org
6516555160 Rename the shared_impl resource files to give them more regular names.
I keep getting confused between things like AudioImpl and PPB_Audio_Impl. This uses _shared for the names, so now we have _impl, _proxy, and _shared which makes more sense.

I also removed the ppb_opengles2_impl file since it was just a forward to the shared version.

BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113290 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-06 23:42:21 +00:00
piman@chromium.org
88cc7818c8 Remove Context3D/Surface3D
Graphics3D is the new black.

BUG=None
TEST=None


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112412 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-01 06:47:09 +00:00
brettw@chromium.org
ac4b54de7f Rename InterfaceID to ApiID and move the file.
This was originally in the proxy and had a 1:1 correspondence with an
interface. Then we reused this for other stuff and then merged some interfaces
into larger APIs (ppapi/thunk/*_api.h) so the name was no longer accurate.
It was wrong to be in the proxy directory since directories at a "lower level"
than the proxy (ppapi/shared_impl and webkit/plugins/ppapi) depended on it.

This renames to ApiID (I avoided APIID since it looks like a define) which is
the proper description of the class, and moved it to shared_impl. This fixes
the deps since there are no longer any bad dependencies on the proxy directory.

TEST=it compiles
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106619 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-20 23:09:28 +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
fischman@chromium.org
2ffc31a4ee Replace the use of an int32* with an explicit profile for decoder configuration.
Replaces the error-prone, overly-general, error-containing, and brittle
manually-terminated array-of-ints holding name/value pairs (except for names
that don't take values) with a simple profile parameter (specifying only information we
actually use today).

BUG=none
TEST=trybots, ovdatest, gles2

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99111 0039d316-1c4b-4281-b951-d872f2087c98
2011-09-01 03:18:28 +00:00
piman@chromium.org
1b2ec22ed8 Allow both Context3D and Graphics3D with the video decoder
BUG=none
TEST=Pepper Flash


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98742 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-30 00:48:33 +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
7f8b26b5f2 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.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97314 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-18 15:41:01 +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
piman@chromium.org
d527cdd8d2 Gracefully handle multiple Flush/Reset/Decode with same id
The DCHECKs don't trigger in release, and in any case it's a bit rude to have
the renderer crash on a plugin that did the wrong thing, so send an error
instead.

BUG=None
TEST=Pepper Flash


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96649 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-12 22:50:19 +00:00
brettw@chromium.org
51e1aec0a2 Convert the PluginResource to be refcounted.
This is to make the future transition to a shared resource tracker (which
will use refcounted resources) easier. There should be no behavior change.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96324 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-11 04:48:30 +00:00
vrk@chromium.org
7ace8ad34d Implement PPAPI VideoDecode out-of-process support
This CL implements the proxy necessary for out-of-process video decoding and
introduces a shared base class between the PPB_VideoDecoder_Impl and the proxy.

BUG=NONE
TEST=gles2 plugin runs with or without --ppapi-out-of-process flag, no crashes


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95724 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-06 03:23:58 +00:00