diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-19 19:30:25 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-19 19:30:25 +0000 |
commit | c700cd063321e870f69260b0be977be8954eefac (patch) | |
tree | 1736f24e2335167e7afff6fdd4bac45c7b77e8ae /content | |
parent | 92f2286d1323d0c4ae2f1bc97ef263c062368d69 (diff) | |
download | chromium_src-c700cd063321e870f69260b0be977be8954eefac.zip chromium_src-c700cd063321e870f69260b0be977be8954eefac.tar.gz chromium_src-c700cd063321e870f69260b0be977be8954eefac.tar.bz2 |
Get the GetInterface function for the broker.
Previously this was skipped, now we call GetInterface in some cases. Adding
this requirement won't break anybody since the broker is the same library as
the pepper plugin, and the pepper plugin requires GetInterface.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10083032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133036 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/ppapi_plugin/ppapi_thread.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc index dec254f..97b9d1f 100644 --- a/content/ppapi_plugin/ppapi_thread.cc +++ b/content/ppapi_plugin/ppapi_thread.cc @@ -188,6 +188,14 @@ void PpapiThread::OnMsgLoadPlugin(const FilePath& path) { return; } + // Get the GetInterface function (required). + get_plugin_interface_ = reinterpret_cast<PP_GetInterface_Func>( + library.GetFunctionPointer("PPP_GetInterface")); + if (!get_plugin_interface_) { + LOG(WARNING) << "No PPP_GetInterface in plugin library"; + return; + } + if (is_broker_) { // Get the InitializeBroker function (required). InitializeBrokerFunc init_broker = @@ -208,15 +216,6 @@ void PpapiThread::OnMsgLoadPlugin(const FilePath& path) { return; } } else { - // Get the GetInterface function (required). - get_plugin_interface_ = - reinterpret_cast<PP_GetInterface_Func>( - library.GetFunctionPointer("PPP_GetInterface")); - if (!get_plugin_interface_) { - LOG(WARNING) << "No PPP_GetInterface in plugin library"; - return; - } - #if defined(OS_MACOSX) // We need to do this after getting |PPP_GetInterface()| (or presumably // doing something nontrivial with the library), else the sandbox @@ -226,7 +225,7 @@ void PpapiThread::OnMsgLoadPlugin(const FilePath& path) { } #endif - // Get the InitializeModule function (required). + // Get the InitializeModule function (required for non-broker code). PP_InitializeModule_Func init_module = reinterpret_cast<PP_InitializeModule_Func>( library.GetFunctionPointer("PPP_InitializeModule")); |