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

Unified Diff: content/renderer/pepper/pepper_in_process_resource_creation.h

Issue 10815073: Refactoring of new IPC-only pepper implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/pepper_in_process_resource_creation.h
diff --git a/content/renderer/pepper/pepper_in_process_resource_creation.h b/content/renderer/pepper/pepper_in_process_resource_creation.h
index 78216b2259c61205d97c006c604d2d125039be56..add434872e2cc6248032be5bdb0c38d99f89573d 100644
--- a/content/renderer/pepper/pepper_in_process_resource_creation.h
+++ b/content/renderer/pepper/pepper_in_process_resource_creation.h
@@ -7,30 +7,29 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
-#include "content/renderer/pepper/pepper_instance_state_accessor_impl.h"
+#include "ppapi/proxy/connection.h"
#include "webkit/plugins/ppapi/resource_creation_impl.h"
-class RenderViewImpl;
-
-namespace ppapi {
-class PpapiPermissions;
-}
-
namespace content {
+class RendererPpapiHostImpl;
+
// This class provides creation functions for the new resources with IPC
// backends that live in content/renderer/pepper.
//
+// (See pepper_in_process_router.h for more information.)
+//
// This is a bit confusing. The "old-style" resources live in
// webkit/plugins/ppapi and are created by the ResourceCreationImpl in that
// directory. The "new-style" IPC-only resources are in ppapi/proxy and are
// created by the RessourceCreationProxy in that directory.
//
-// This class allows us to run new-style IPC-only resources in-process. We have
-// an IPC reflector to run it in process. But then we have a problem with
-// allocating the resources since src/webkit can't depend on IPC or see our IPC
-// backend in content. This class overrides the normal in-process resource
-// creation and adds in the resources that we implement in ppapi/proxy.
+// This class allows us to run new-style IPC-only resources in-process. We use
+// the PepperInProcessRouter to run it in process. But then we have a problem
+// with allocating the resources since src/webkit can't depend on IPC or see
+// our IPC backend in content. This class overrides the normal in-process
+// resource creation and adds in the resources that we implement in
+// ppapi/proxy.
//
// When we convert all resources to use the new-style, we can just use the
// ResourceCreationProxy for all resources. This class is just glue to manage
@@ -38,9 +37,8 @@ namespace content {
class PepperInProcessResourceCreation
: public webkit::ppapi::ResourceCreationImpl {
public:
- PepperInProcessResourceCreation(RenderViewImpl* render_view,
- webkit::ppapi::PluginInstance* instance,
- const ppapi::PpapiPermissions& perms);
+ PepperInProcessResourceCreation(RendererPpapiHostImpl* host_impl,
+ webkit::ppapi::PluginInstance* instance);
virtual ~PepperInProcessResourceCreation();
// ResourceCreation_API implementation.
@@ -50,13 +48,8 @@ class PepperInProcessResourceCreation
const char* accept_types) OVERRIDE;
private:
- PepperInstanceStateAccessorImpl instance_state_;
-
- class HostToPluginRouter;
- scoped_ptr<HostToPluginRouter> host_to_plugin_router_;
-
- class PluginToHostRouter;
- scoped_ptr<PluginToHostRouter> plugin_to_host_router_;
+ // Non-owning pointer to the host for the current plugin.
+ RendererPpapiHostImpl* host_impl_;
DISALLOW_COPY_AND_ASSIGN(PepperInProcessResourceCreation);
};

Powered by Google App Engine
This is Rietveld 408576698