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

Unified Diff: content/browser/ppapi_plugin_process_host.h

Issue 9150017: Add a Content API around BrowserChildProcessHost, similar to what was done with ChildProcessHost.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix?! Created 8 years, 11 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/browser/plugin_service_impl.cc ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/ppapi_plugin_process_host.h
===================================================================
--- content/browser/ppapi_plugin_process_host.h (revision 118420)
+++ content/browser/ppapi_plugin_process_host.h (working copy)
@@ -12,9 +12,13 @@
#include "base/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/ref_counted.h"
-#include "content/browser/browser_child_process_host.h"
#include "content/browser/renderer_host/pepper_message_filter.h"
+#include "content/public/browser/browser_child_process_host_delegate.h"
+#include "content/public/browser/browser_child_process_host_iterator.h"
+#include "ipc/ipc_message.h"
+class BrowserChildProcessHost;
+
namespace content {
struct PepperPluginInfo;
class ResourceContext;
@@ -26,8 +30,8 @@
// Process host for PPAPI plugin and broker processes.
// When used for the broker, interpret all references to "plugin" with "broker".
-class PpapiPluginProcessHost
- : public BrowserChildProcessHost {
+class PpapiPluginProcessHost : public content::BrowserChildProcessHostDelegate,
+ public IPC::Message::Sender {
public:
class Client {
public:
@@ -60,6 +64,9 @@
static PpapiPluginProcessHost* CreateBrokerHost(
const content::PepperPluginInfo& info);
+ // IPC::Message::Sender implementation:
+ virtual bool Send(IPC::Message* message) OVERRIDE;
+
// Opens a new channel to the plugin. The client will be notified when the
// channel is ready or if there's an error.
void OpenChannelToPlugin(Client* client);
@@ -115,8 +122,28 @@
// The unique id created for the process.
int process_id_;
+ scoped_ptr<BrowserChildProcessHost> process_;
+
DISALLOW_COPY_AND_ASSIGN(PpapiPluginProcessHost);
};
+class PpapiPluginProcessHostIterator
+ : public content::BrowserChildProcessHostTypeIterator<
+ PpapiPluginProcessHost> {
+ public:
+ PpapiPluginProcessHostIterator()
+ : content::BrowserChildProcessHostTypeIterator<
+ PpapiPluginProcessHost>(content::PROCESS_TYPE_PPAPI_PLUGIN) {}
+};
+
+class PpapiBrokerProcessHostIterator
+ : public content::BrowserChildProcessHostTypeIterator<
+ PpapiPluginProcessHost> {
+ public:
+ PpapiBrokerProcessHostIterator()
+ : content::BrowserChildProcessHostTypeIterator<
+ PpapiPluginProcessHost>(content::PROCESS_TYPE_PPAPI_BROKER) {}
+};
+
#endif // CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_
« no previous file with comments | « content/browser/plugin_service_impl.cc ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698