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

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

Issue 20777009: A few more cleanups to the pepper code. Dispatch IPCs in the sockets implementations directly by ha… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix browsertest Created 7 years, 4 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
Index: content/renderer/pepper/renderer_ppapi_host_impl.cc
===================================================================
--- content/renderer/pepper/renderer_ppapi_host_impl.cc (revision 215615)
+++ content/renderer/pepper/renderer_ppapi_host_impl.cc (working copy)
@@ -122,21 +122,6 @@
new PepperInProcessResourceCreation(this, instance));
}
-PepperBrowserConnection*
-RendererPpapiHostImpl::GetBrowserConnection(PP_Instance instance) const {
- PepperPluginInstanceImpl* instance_object = GetAndValidateInstance(instance);
- if (!instance_object)
- return NULL;
-
- // Since we're the embedder, we can make assumptions about the helper on
- // the instance.
- PepperHelperImpl* helper = instance_object->helper();
- if (!helper)
- return NULL;
-
- return helper->pepper_browser_connection();
-}
-
PepperPluginInstanceImpl* RendererPpapiHostImpl::GetPluginInstanceImpl(
PP_Instance instance) const {
return GetAndValidateInstance(instance);
@@ -245,8 +230,10 @@
PP_Instance instance,
const IPC::Message& nested_msg,
const base::Callback<void(int)>& callback) const {
- PepperBrowserConnection* browser_connection = GetBrowserConnection(instance);
- if (browser_connection == NULL) {
+ RenderView* render_view = GetRenderViewForInstance(instance);
+ PepperBrowserConnection* browser_connection =
+ PepperBrowserConnection::Get(render_view);
+ if (!browser_connection) {
callback.Run(0);
} else {
browser_connection->SendBrowserCreate(module_->GetPluginChildId(),
« no previous file with comments | « content/renderer/pepper/renderer_ppapi_host_impl.h ('k') | content/renderer/pepper/resource_creation_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698