Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1289)

Unified Diff: content/renderer/pepper/renderer_ppapi_host_impl.cc

Issue 10949008: Fix up instance registration with the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser tag test Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/pepper/renderer_ppapi_host_impl.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/renderer_ppapi_host_impl.cc
diff --git a/content/renderer/pepper/renderer_ppapi_host_impl.cc b/content/renderer/pepper/renderer_ppapi_host_impl.cc
index 8447093be3bb1b3e6b80376faabd7243b27b74f3..0dde8e2638088938589bfe15cc62f51adee725c1 100644
--- a/content/renderer/pepper/renderer_ppapi_host_impl.cc
+++ b/content/renderer/pepper/renderer_ppapi_host_impl.cc
@@ -79,6 +79,19 @@ RendererPpapiHostImpl* RendererPpapiHostImpl::CreateOnModuleForInProcess(
return result;
}
+// static
+RendererPpapiHostImpl* RendererPpapiHostImpl::GetForPPInstance(
+ PP_Instance pp_instance) {
+ PluginInstance* instance = HostGlobals::Get()->GetInstance(pp_instance);
+ if (!instance)
+ return NULL;
+
+ // All modules created by content will have their embedders state be the
+ // host impl.
+ return static_cast<RendererPpapiHostImpl*>(
+ instance->module()->GetEmbedderState());
+}
+
scoped_ptr< ::ppapi::thunk::ResourceCreationAPI>
RendererPpapiHostImpl::CreateInProcessResourceCreationAPI(
webkit::ppapi::PluginInstance* instance) {
« no previous file with comments | « content/renderer/pepper/renderer_ppapi_host_impl.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698