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

Side by Side Diff: content/browser/ppapi_plugin_process_host.h

Issue 10919169: Change how PepperMessageFilter is constructed, to simplify its use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ 5 #ifndef CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_
6 #define CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ 6 #define CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <queue> 9 #include <queue>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 class BrokerClient : public Client { 69 class BrokerClient : public Client {
70 protected: 70 protected:
71 virtual ~BrokerClient() {} 71 virtual ~BrokerClient() {}
72 }; 72 };
73 73
74 virtual ~PpapiPluginProcessHost(); 74 virtual ~PpapiPluginProcessHost();
75 75
76 static PpapiPluginProcessHost* CreatePluginHost( 76 static PpapiPluginProcessHost* CreatePluginHost(
77 const content::PepperPluginInfo& info, 77 const content::PepperPluginInfo& info,
78 const FilePath& profile_data_directory, 78 const FilePath& profile_data_directory,
79 net::HostResolver* host_resolver); 79 int render_process_id);
80 static PpapiPluginProcessHost* CreateBrokerHost( 80 static PpapiPluginProcessHost* CreateBrokerHost(
81 const content::PepperPluginInfo& info); 81 const content::PepperPluginInfo& info);
82 82
83 // IPC::Sender implementation: 83 // IPC::Sender implementation:
84 virtual bool Send(IPC::Message* message) OVERRIDE; 84 virtual bool Send(IPC::Message* message) OVERRIDE;
85 85
86 // Opens a new channel to the plugin. The client will be notified when the 86 // Opens a new channel to the plugin. The client will be notified when the
87 // channel is ready or if there's an error. 87 // channel is ready or if there's an error.
88 void OpenChannelToPlugin(Client* client); 88 void OpenChannelToPlugin(Client* client);
89 89
90 const FilePath& plugin_path() const { return plugin_path_; } 90 const FilePath& plugin_path() const { return plugin_path_; }
91 const FilePath& profile_data_directory() const { 91 const FilePath& profile_data_directory() const {
92 return profile_data_directory_; 92 return profile_data_directory_;
93 } 93 }
94 94
95 // The client pointer must remain valid until its callback is issued. 95 // The client pointer must remain valid until its callback is issued.
96 96
97 private: 97 private:
98 class PluginNetworkObserver; 98 class PluginNetworkObserver;
99 99
100 // Constructors for plugin and broker process hosts, respectively. 100 // Constructors for plugin and broker process hosts, respectively.
101 // You must call Init before doing anything else. 101 // You must call Init before doing anything else.
102 PpapiPluginProcessHost(const content::PepperPluginInfo& info, 102 PpapiPluginProcessHost(const content::PepperPluginInfo& info,
103 const FilePath& profile_data_directory, 103 const FilePath& profile_data_directory,
104 net::HostResolver* host_resolver); 104 int render_process_id);
105 PpapiPluginProcessHost(); 105 PpapiPluginProcessHost();
106 106
107 // Actually launches the process with the given plugin info. Returns true 107 // Actually launches the process with the given plugin info. Returns true
108 // on success (the process was spawned). 108 // on success (the process was spawned).
109 bool Init(const content::PepperPluginInfo& info); 109 bool Init(const content::PepperPluginInfo& info);
110 110
111 void RequestPluginChannel(Client* client); 111 void RequestPluginChannel(Client* client);
112 112
113 virtual void OnProcessLaunched() OVERRIDE; 113 virtual void OnProcessLaunched() OVERRIDE;
114 114
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 : public content::BrowserChildProcessHostTypeIterator< 166 : public content::BrowserChildProcessHostTypeIterator<
167 PpapiPluginProcessHost> { 167 PpapiPluginProcessHost> {
168 public: 168 public:
169 PpapiBrokerProcessHostIterator() 169 PpapiBrokerProcessHostIterator()
170 : content::BrowserChildProcessHostTypeIterator< 170 : content::BrowserChildProcessHostTypeIterator<
171 PpapiPluginProcessHost>(content::PROCESS_TYPE_PPAPI_BROKER) {} 171 PpapiPluginProcessHost>(content::PROCESS_TYPE_PPAPI_BROKER) {}
172 }; 172 };
173 173
174 #endif // CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_ 174 #endif // CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_
175 175
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698