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

Side by Side Diff: components/nacl/browser/nacl_process_host.h

Issue 131413009: Prototype: Use Chromium IPC for plugin LOAD_MODULE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, some FIXMEs cleaned up Created 6 years, 10 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 COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ 5 #ifndef COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_
6 #define COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ 6 #define COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 128 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
129 virtual void OnProcessLaunched() OVERRIDE; 129 virtual void OnProcessLaunched() OVERRIDE;
130 130
131 void OnResourcesReady(); 131 void OnResourcesReady();
132 132
133 // Enable the PPAPI proxy only for NaCl processes corresponding to a renderer. 133 // Enable the PPAPI proxy only for NaCl processes corresponding to a renderer.
134 bool enable_ppapi_proxy() { return render_view_id_ != 0; } 134 bool enable_ppapi_proxy() { return render_view_id_ != 0; }
135 135
136 // Sends the reply message to the renderer who is waiting for the plugin 136 // Sends the reply message to the renderer who is waiting for the plugin
137 // to load. Returns true on success. 137 // to load. Returns true on success.
138 bool ReplyToRenderer(const IPC::ChannelHandle& channel_handle); 138 bool ReplyToRenderer();
139 139
140 // Sends the reply with error message to the renderer. 140 // Sends the reply with error message to the renderer.
141 void SendErrorToRenderer(const std::string& error_message); 141 void SendErrorToRenderer(const std::string& error_message);
142 142
143 // Sends the reply message to the renderer. Either result or 143 // Sends the reply message to the renderer. Either result or
144 // error message must be empty. 144 // error message must be empty.
145 void SendMessageToRenderer(const NaClLaunchResult& result, 145 void SendMessageToRenderer(const NaClLaunchResult& result,
146 const std::string& error_message); 146 const std::string& error_message);
147 147
148 // Sends the message to the NaCl process to load the plugin. Returns true 148 // Sends the message to the NaCl process to load the plugin. Returns true
(...skipping 24 matching lines...) Expand all
173 void OnAttachDebugExceptionHandler(const std::string& info, 173 void OnAttachDebugExceptionHandler(const std::string& info,
174 IPC::Message* reply_msg); 174 IPC::Message* reply_msg);
175 bool AttachDebugExceptionHandler(const std::string& info, 175 bool AttachDebugExceptionHandler(const std::string& info,
176 IPC::Message* reply_msg); 176 IPC::Message* reply_msg);
177 #endif 177 #endif
178 178
179 // Called when the PPAPI IPC channel to the browser has been created. 179 // Called when the PPAPI IPC channel to the browser has been created.
180 void OnPpapiBrowserChannelCreated(const IPC::ChannelHandle& channel_handle); 180 void OnPpapiBrowserChannelCreated(const IPC::ChannelHandle& channel_handle);
181 // Called when the PPAPI IPC channel to the renderer has been created. 181 // Called when the PPAPI IPC channel to the renderer has been created.
182 void OnPpapiRendererChannelCreated(const IPC::ChannelHandle& channel_handle); 182 void OnPpapiRendererChannelCreated(const IPC::ChannelHandle& channel_handle);
183 // Called when the NaCl IPC channel to the renderer has been created
dmichael (off chromium) 2014/02/06 18:18:47 nit: period
184 void OnTrustedPluginChannelCreated(const IPC::ChannelHandle& channel_handle);
183 185
184 // Called by PluginListener, so messages from the untrusted side of 186 // Called by PluginListener, so messages from the untrusted side of
185 // the IPC proxy can be handled. 187 // the IPC proxy can be handled.
186 bool OnUntrustedMessageForwarded(const IPC::Message& msg); 188 bool OnUntrustedMessageForwarded(const IPC::Message& msg);
187 189
188 GURL manifest_url_; 190 GURL manifest_url_;
189 ppapi::PpapiPermissions permissions_; 191 ppapi::PpapiPermissions permissions_;
190 192
191 #if defined(OS_WIN) 193 #if defined(OS_WIN)
192 // This field becomes true when the broker successfully launched 194 // This field becomes true when the broker successfully launched
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 232
231 // Channel proxy to terminate the NaCl-Browser PPAPI channel. 233 // Channel proxy to terminate the NaCl-Browser PPAPI channel.
232 scoped_ptr<IPC::ChannelProxy> ipc_proxy_channel_; 234 scoped_ptr<IPC::ChannelProxy> ipc_proxy_channel_;
233 // Plugin listener, to forward browser channel messages to us. 235 // Plugin listener, to forward browser channel messages to us.
234 PluginListener ipc_plugin_listener_; 236 PluginListener ipc_plugin_listener_;
235 // Browser host for plugin process. 237 // Browser host for plugin process.
236 scoped_ptr<content::BrowserPpapiHost> ppapi_host_; 238 scoped_ptr<content::BrowserPpapiHost> ppapi_host_;
237 239
238 int render_view_id_; 240 int render_view_id_;
239 241
242 IPC::ChannelHandle ppapi_renderer_channel_handle_;
243 IPC::ChannelHandle nacl_renderer_channel_handle_;
244
240 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); 245 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost);
241 }; 246 };
242 247
243 } // namespace nacl 248 } // namespace nacl
244 249
245 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ 250 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698