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

Side by Side Diff: chrome/browser/nacl_host/nacl_process_host.h

Issue 11368019: Add support for external out-of-process PPAPI plugins in the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ 5 #ifndef CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_
6 #define CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ 6 #define CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/file_util_proxy.h" 11 #include "base/file_util_proxy.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "base/process.h" 15 #include "base/process.h"
16 #include "chrome/common/nacl_types.h" 16 #include "chrome/common/nacl_types.h"
17 #include "content/public/browser/browser_child_process_host_delegate.h" 17 #include "content/public/browser/browser_child_process_host_delegate.h"
18 #include "content/public/browser/browser_child_process_host_iterator.h"
18 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
19 #include "ipc/ipc_channel_handle.h" 20 #include "ipc/ipc_channel_handle.h"
20 #include "net/base/tcp_listen_socket.h" 21 #include "net/base/tcp_listen_socket.h"
21 #include "ppapi/shared_impl/ppapi_permissions.h" 22 #include "ppapi/shared_impl/ppapi_permissions.h"
22 23
23 class ChromeRenderMessageFilter; 24 class ChromeRenderMessageFilter;
24 class CommandLine; 25 class CommandLine;
25 class ExtensionInfoMap; 26 class ExtensionInfoMap;
26 27
27 namespace content { 28 namespace content {
28 class BrowserChildProcessHost; 29 class BrowserChildProcessHost;
30 class BrowserPpapiHost;
29 } 31 }
30 32
31 namespace IPC { 33 namespace IPC {
32 class ChannelProxy; 34 class ChannelProxy;
33 } 35 }
34 36
35 // Represents the browser side of the browser <--> NaCl communication 37 // Represents the browser side of the browser <--> NaCl communication
36 // channel. There will be one NaClProcessHost per NaCl process 38 // channel. There will be one NaClProcessHost per NaCl process
37 // The browser is responsible for starting the NaCl process 39 // The browser is responsible for starting the NaCl process
38 // when requested by the renderer. 40 // when requested by the renderer.
(...skipping 24 matching lines...) Expand all
63 65
64 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 66 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
65 67
66 #if defined(OS_WIN) 68 #if defined(OS_WIN)
67 void OnProcessLaunchedByBroker(base::ProcessHandle handle); 69 void OnProcessLaunchedByBroker(base::ProcessHandle handle);
68 void OnDebugExceptionHandlerLaunchedByBroker(bool success); 70 void OnDebugExceptionHandlerLaunchedByBroker(bool success);
69 #endif 71 #endif
70 72
71 bool Send(IPC::Message* msg); 73 bool Send(IPC::Message* msg);
72 74
75 content::BrowserChildProcessHost* process() { return process_.get(); }
76 content::BrowserPpapiHost* browser_ppapi_host() { return ppapi_host_.get(); }
77
73 private: 78 private:
74 friend class PluginListener; 79 friend class PluginListener;
75 80
76 // Internal class that holds the nacl::Handle objecs so that 81 // Internal class that holds the nacl::Handle objecs so that
77 // nacl_process_host.h doesn't include NaCl headers. Needed since it's 82 // nacl_process_host.h doesn't include NaCl headers. Needed since it's
78 // included by src\content, which can't depend on the NaCl gyp file because it 83 // included by src\content, which can't depend on the NaCl gyp file because it
79 // depends on chrome.gyp (circular dependency). 84 // depends on chrome.gyp (circular dependency).
80 struct NaClInternal; 85 struct NaClInternal;
81 86
82 // PluginListener that forwards any messages from untrusted code that aren't 87 // PluginListener that forwards any messages from untrusted code that aren't
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 bool enable_debug_stub_; 196 bool enable_debug_stub_;
192 197
193 bool off_the_record_; 198 bool off_the_record_;
194 199
195 bool enable_ipc_proxy_; 200 bool enable_ipc_proxy_;
196 201
197 // Channel proxy to terminate the NaCl-Browser PPAPI channel. 202 // Channel proxy to terminate the NaCl-Browser PPAPI channel.
198 scoped_ptr<IPC::ChannelProxy> ipc_proxy_channel_; 203 scoped_ptr<IPC::ChannelProxy> ipc_proxy_channel_;
199 // Plugin listener, to forward browser channel messages to us. 204 // Plugin listener, to forward browser channel messages to us.
200 PluginListener ipc_plugin_listener_; 205 PluginListener ipc_plugin_listener_;
206 // Browser host for plugin process.
207 scoped_ptr<content::BrowserPpapiHost> ppapi_host_;
201 208
202 int render_view_id_; 209 int render_view_id_;
203 210
204 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); 211 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost);
205 }; 212 };
206 213
207 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ 214 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/nacl_host/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698