diff options
author | ddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-16 22:12:45 +0000 |
---|---|---|
committer | ddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-16 22:12:45 +0000 |
commit | e2614c60e3bab6cc1b949ecd8101189d285da17f (patch) | |
tree | f664f4e27974b7dee547aba035abef48e27c167c /ppapi/proxy/plugin_dispatcher.h | |
parent | 64a2958841eb968837a90c9a738d9b68e33abb70 (diff) | |
download | chromium_src-e2614c60e3bab6cc1b949ecd8101189d285da17f.zip chromium_src-e2614c60e3bab6cc1b949ecd8101189d285da17f.tar.gz chromium_src-e2614c60e3bab6cc1b949ecd8101189d285da17f.tar.bz2 |
Refactored ppapi Dispatcher to share common code between the plugin and broker dispatchers.
Common code is in DispatcherBase. The base of the dispatcher for plugins remains Dispatcher. The base of the dispatcher for Brokers is BrokerDispatcher.
BUG=none
TEST=ppapi out-of-process plugins
Review URL: http://codereview.chromium.org/6859003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81883 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/plugin_dispatcher.h')
-rw-r--r-- | ppapi/proxy/plugin_dispatcher.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ppapi/proxy/plugin_dispatcher.h b/ppapi/proxy/plugin_dispatcher.h index dbc13d2..efa0d70 100644 --- a/ppapi/proxy/plugin_dispatcher.h +++ b/ppapi/proxy/plugin_dispatcher.h @@ -35,7 +35,7 @@ class PluginDispatcher : public Dispatcher { // will be automatically called when requested by the renderer side. The // module ID will be set upon receipt of the InitializeModule message. // - // You must call Dispatcher::InitWithChannel after the constructor. + // You must call InitPluginWithChannel after the constructor. PluginDispatcher(base::ProcessHandle remote_process_handle, GetInterfaceFunc get_interface); virtual ~PluginDispatcher(); @@ -48,10 +48,14 @@ class PluginDispatcher : public Dispatcher { static const void* GetInterfaceFromDispatcher(const char* interface); + // You must call this function before anything else. Returns true on success. + // The delegate pointer must outlive this class, ownership is not + // transferred. + virtual bool InitPluginWithChannel(Dispatcher::Delegate* delegate, + const IPC::ChannelHandle& channel_handle, + bool is_client); + // Dispatcher overrides. - virtual bool InitWithChannel(Delegate* delegate, - const IPC::ChannelHandle& channel_handle, - bool is_client); virtual bool IsPlugin() const; virtual bool Send(IPC::Message* msg); @@ -68,10 +72,6 @@ class PluginDispatcher : public Dispatcher { // correspond to a known instance. InstanceData* GetInstanceData(PP_Instance instance); -#if defined(OS_POSIX) - int GetRendererFD(); -#endif - private: friend class PluginDispatcherTest; |