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

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

Issue 15906013: Separate NaCl messages from the rest of chrome messages and create a new message filter. This is pa… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 6 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
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/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/files/file_util_proxy.h" 11 #include "base/files/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 "content/public/browser/browser_child_process_host_iterator.h"
19 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
20 #include "ipc/ipc_channel_handle.h" 20 #include "ipc/ipc_channel_handle.h"
21 #include "net/socket/tcp_listen_socket.h" 21 #include "net/socket/tcp_listen_socket.h"
22 #include "ppapi/shared_impl/ppapi_permissions.h" 22 #include "ppapi/shared_impl/ppapi_permissions.h"
23 23
24 class ChromeRenderMessageFilter; 24 class NaClHostMessageFilter;
25 class CommandLine; 25 class CommandLine;
26 class ExtensionInfoMap; 26 class ExtensionInfoMap;
27 27
28 namespace content { 28 namespace content {
29 class BrowserChildProcessHost; 29 class BrowserChildProcessHost;
30 class BrowserPpapiHost; 30 class BrowserPpapiHost;
31 } 31 }
32 32
33 namespace IPC { 33 namespace IPC {
34 class ChannelProxy; 34 class ChannelProxy;
(...skipping 21 matching lines...) Expand all
56 bool enable_exception_handling, 56 bool enable_exception_handling,
57 bool off_the_record, 57 bool off_the_record,
58 const base::FilePath& profile_directory); 58 const base::FilePath& profile_directory);
59 virtual ~NaClProcessHost(); 59 virtual ~NaClProcessHost();
60 60
61 // Do any minimal work that must be done at browser startup. 61 // Do any minimal work that must be done at browser startup.
62 static void EarlyStartup(); 62 static void EarlyStartup();
63 63
64 // Initialize the new NaCl process. Result is returned by sending ipc 64 // Initialize the new NaCl process. Result is returned by sending ipc
65 // message reply_msg. 65 // message reply_msg.
66 void Launch(ChromeRenderMessageFilter* chrome_render_message_filter, 66 void Launch(NaClHostMessageFilter* nacl_host_message_filter,
67 IPC::Message* reply_msg, 67 IPC::Message* reply_msg,
68 scoped_refptr<ExtensionInfoMap> extension_info_map); 68 scoped_refptr<ExtensionInfoMap> extension_info_map);
69 69
70 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 70 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
71 71
72 #if defined(OS_WIN) 72 #if defined(OS_WIN)
73 void OnProcessLaunchedByBroker(base::ProcessHandle handle); 73 void OnProcessLaunchedByBroker(base::ProcessHandle handle);
74 void OnDebugExceptionHandlerLaunchedByBroker(bool success); 74 void OnDebugExceptionHandlerLaunchedByBroker(bool success);
75 #endif 75 #endif
76 76
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 bool OnUntrustedMessageForwarded(const IPC::Message& msg); 161 bool OnUntrustedMessageForwarded(const IPC::Message& msg);
162 162
163 GURL manifest_url_; 163 GURL manifest_url_;
164 ppapi::PpapiPermissions permissions_; 164 ppapi::PpapiPermissions permissions_;
165 165
166 #if defined(OS_WIN) 166 #if defined(OS_WIN)
167 // This field becomes true when the broker successfully launched 167 // This field becomes true when the broker successfully launched
168 // the NaCl loader. 168 // the NaCl loader.
169 bool process_launched_by_broker_; 169 bool process_launched_by_broker_;
170 #endif 170 #endif
171 // The ChromeRenderMessageFilter that requested this NaCl process. We use 171 // The NaClHostMessageFilter that requested this NaCl process. We use
172 // this for sending the reply once the process has started. 172 // this for sending the reply once the process has started.
173 scoped_refptr<ChromeRenderMessageFilter> chrome_render_message_filter_; 173 scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter_;
174 174
175 // The reply message to send. We must always send this message when the 175 // The reply message to send. We must always send this message when the
176 // sub-process either succeeds or fails to unblock the renderer waiting for 176 // sub-process either succeeds or fails to unblock the renderer waiting for
177 // the reply. NULL when there is no reply to send. 177 // the reply. NULL when there is no reply to send.
178 IPC::Message* reply_msg_; 178 IPC::Message* reply_msg_;
179 #if defined(OS_WIN) 179 #if defined(OS_WIN)
180 bool debug_exception_handler_requested_; 180 bool debug_exception_handler_requested_;
181 scoped_ptr<IPC::Message> attach_debug_exception_handler_reply_msg_; 181 scoped_ptr<IPC::Message> attach_debug_exception_handler_reply_msg_;
182 #endif 182 #endif
183 183
(...skipping 24 matching lines...) Expand all
208 PluginListener ipc_plugin_listener_; 208 PluginListener ipc_plugin_listener_;
209 // Browser host for plugin process. 209 // Browser host for plugin process.
210 scoped_ptr<content::BrowserPpapiHost> ppapi_host_; 210 scoped_ptr<content::BrowserPpapiHost> ppapi_host_;
211 211
212 int render_view_id_; 212 int render_view_id_;
213 213
214 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); 214 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost);
215 }; 215 };
216 216
217 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ 217 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_host_message_filter.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