diff options
author | ddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-14 02:45:42 +0000 |
---|---|---|
committer | ddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-14 02:45:42 +0000 |
commit | eb415bf0e3fa41131a0f1f706e4f377d86206556 (patch) | |
tree | 0d9ea90ce1bbae21a4c64181eb130fd1f37073bd /webkit/plugins/ppapi/plugin_delegate.h | |
parent | 6407f289f81ac09476e66c59fc4887eb46112981 (diff) | |
download | chromium_src-eb415bf0e3fa41131a0f1f706e4f377d86206556.zip chromium_src-eb415bf0e3fa41131a0f1f706e4f377d86206556.tar.gz chromium_src-eb415bf0e3fa41131a0f1f706e4f377d86206556.tar.bz2 |
Asynchronously create the ppapi broker.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6822012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81525 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/plugin_delegate.h')
-rw-r--r-- | webkit/plugins/ppapi/plugin_delegate.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h index 786e924..d986e95 100644 --- a/webkit/plugins/ppapi/plugin_delegate.h +++ b/webkit/plugins/ppapi/plugin_delegate.h @@ -210,15 +210,18 @@ class PluginDelegate { }; // Provides access to the ppapi broker. - class PpapiBroker { + class PpapiBroker : public base::RefCountedThreadSafe<PpapiBroker> { public: - virtual ~PpapiBroker() {} + virtual void Connect(webkit::ppapi::PPB_Broker_Impl* client) = 0; - // Decrements the references to the broker for the instance. - // When the references reach 0 for all instances in this renderer, this - // object may be destroyed. When the references reach 0 for all instances - // using the same module, the broker may shut down. - virtual void Release(PluginInstance* instance) = 0; + // Decrements the references to the broker. + // When there are no more references, this renderer's dispatcher is + // destroyed, allowing the broker to shutdown if appropriate. + virtual void Disconnect(webkit::ppapi::PPB_Broker_Impl* client) = 0; + + protected: + friend class base::RefCountedThreadSafe<PpapiBroker>; + ~PpapiBroker() {} }; // Notification that the given plugin has crashed. When a plugin crashes, all @@ -259,7 +262,6 @@ class PluginDelegate { // The caller is responsible for calling Release() on the returned pointer // to clean up the corresponding resources allocated during this call. virtual PpapiBroker* ConnectToPpapiBroker( - PluginInstance* instance, webkit::ppapi::PPB_Broker_Impl* client) = 0; // Notifies that the number of find results has changed. |