diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-13 22:46:42 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-13 22:46:42 +0000 |
commit | 5ed5a3eebe9cab0c54cc23ab3d059af37a4f3a92 (patch) | |
tree | 4e802bfe6319118b99483ada9888bbaebd17516e /content/ppapi_plugin | |
parent | d99bcf2707cd81d8653485cab5d32f4811a58112 (diff) | |
download | chromium_src-5ed5a3eebe9cab0c54cc23ab3d059af37a4f3a92.zip chromium_src-5ed5a3eebe9cab0c54cc23ab3d059af37a4f3a92.tar.gz chromium_src-5ed5a3eebe9cab0c54cc23ab3d059af37a4f3a92.tar.bz2 |
Add a way to implement GetInterface in the broker.
This also adds some cleanup in the Pepper API to provide typedefs for the three PPP_* functions. I removed some ad-hoc typedefes we had floating around and replaced them with these more "official" ones.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10069035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132285 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin')
-rw-r--r-- | content/ppapi_plugin/plugin_process_dispatcher.cc | 2 | ||||
-rw-r--r-- | content/ppapi_plugin/plugin_process_dispatcher.h | 2 | ||||
-rw-r--r-- | content/ppapi_plugin/ppapi_thread.cc | 12 | ||||
-rw-r--r-- | content/ppapi_plugin/ppapi_thread.h | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/content/ppapi_plugin/plugin_process_dispatcher.cc b/content/ppapi_plugin/plugin_process_dispatcher.cc index 5d33e12..22c42c7 100644 --- a/content/ppapi_plugin/plugin_process_dispatcher.cc +++ b/content/ppapi_plugin/plugin_process_dispatcher.cc @@ -17,7 +17,7 @@ const int kPluginReleaseTimeSeconds = 30; PluginProcessDispatcher::PluginProcessDispatcher( base::ProcessHandle remote_process_handle, - GetInterfaceFunc get_interface) + PP_GetInterface_Func get_interface) : ppapi::proxy::PluginDispatcher(remote_process_handle, get_interface) { ChildProcess::current()->AddRefProcess(); } diff --git a/content/ppapi_plugin/plugin_process_dispatcher.h b/content/ppapi_plugin/plugin_process_dispatcher.h index ffcdc48..12455d8 100644 --- a/content/ppapi_plugin/plugin_process_dispatcher.h +++ b/content/ppapi_plugin/plugin_process_dispatcher.h @@ -14,7 +14,7 @@ class PluginProcessDispatcher : public ppapi::proxy::PluginDispatcher { public: PluginProcessDispatcher(base::ProcessHandle remote_process_handle, - GetInterfaceFunc get_interface); + PP_GetInterface_Func get_interface); virtual ~PluginProcessDispatcher(); private: diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc index 30c99b1..dec254f 100644 --- a/content/ppapi_plugin/ppapi_thread.cc +++ b/content/ppapi_plugin/ppapi_thread.cc @@ -63,11 +63,11 @@ PpapiThread::~PpapiThread() { return; // The ShutdownModule/ShutdownBroker function is optional. - ppapi::proxy::ProxyChannel::ShutdownModuleFunc shutdown_function = + PP_ShutdownModule_Func shutdown_function = is_broker_ ? - reinterpret_cast<ppapi::proxy::ProxyChannel::ShutdownModuleFunc>( + reinterpret_cast<PP_ShutdownModule_Func>( library_.GetFunctionPointer("PPP_ShutdownBroker")) : - reinterpret_cast<ppapi::proxy::ProxyChannel::ShutdownModuleFunc>( + reinterpret_cast<PP_ShutdownModule_Func>( library_.GetFunctionPointer("PPP_ShutdownModule")); if (shutdown_function) shutdown_function(); @@ -210,7 +210,7 @@ void PpapiThread::OnMsgLoadPlugin(const FilePath& path) { } else { // Get the GetInterface function (required). get_plugin_interface_ = - reinterpret_cast<ppapi::proxy::Dispatcher::GetInterfaceFunc>( + reinterpret_cast<PP_GetInterface_Func>( library.GetFunctionPointer("PPP_GetInterface")); if (!get_plugin_interface_) { LOG(WARNING) << "No PPP_GetInterface in plugin library"; @@ -227,8 +227,8 @@ void PpapiThread::OnMsgLoadPlugin(const FilePath& path) { #endif // Get the InitializeModule function (required). - ppapi::proxy::Dispatcher::InitModuleFunc init_module = - reinterpret_cast<ppapi::proxy::Dispatcher::InitModuleFunc>( + PP_InitializeModule_Func init_module = + reinterpret_cast<PP_InitializeModule_Func>( library.GetFunctionPointer("PPP_InitializeModule")); if (!init_module) { LOG(WARNING) << "No PPP_InitializeModule in plugin library"; diff --git a/content/ppapi_plugin/ppapi_thread.h b/content/ppapi_plugin/ppapi_thread.h index e7e046c..dfd23ab 100644 --- a/content/ppapi_plugin/ppapi_thread.h +++ b/content/ppapi_plugin/ppapi_thread.h @@ -86,7 +86,7 @@ class PpapiThread : public ChildThread, // Global state tracking for the proxy. ppapi::proxy::PluginGlobals plugin_globals_; - ppapi::proxy::Dispatcher::GetInterfaceFunc get_plugin_interface_; + PP_GetInterface_Func get_plugin_interface_; // Callback to call when a new instance connects to the broker. // Used only when is_broker_. |