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

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

Issue 332463003: Pepper: Remove LOAD_MODULE SRPC call in SFI mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 5 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.h" 10 #include "base/files/file.h"
(...skipping 27 matching lines...) Expand all
38 38
39 // Represents the browser side of the browser <--> NaCl communication 39 // Represents the browser side of the browser <--> NaCl communication
40 // channel. There will be one NaClProcessHost per NaCl process 40 // channel. There will be one NaClProcessHost per NaCl process
41 // The browser is responsible for starting the NaCl process 41 // The browser is responsible for starting the NaCl process
42 // when requested by the renderer. 42 // when requested by the renderer.
43 // After that, most of the communication is directly between NaCl plugin 43 // After that, most of the communication is directly between NaCl plugin
44 // running in the renderer and NaCl processes. 44 // running in the renderer and NaCl processes.
45 class NaClProcessHost : public content::BrowserChildProcessHostDelegate { 45 class NaClProcessHost : public content::BrowserChildProcessHostDelegate {
46 public: 46 public:
47 // manifest_url: the URL of the manifest of the Native Client plugin being 47 // manifest_url: the URL of the manifest of the Native Client plugin being
48 // executed. 48 // executed.
bbudge 2014/06/30 18:28:53 Should we add comments for new params?
teravest 2014/06/30 22:04:55 Done.
49 // permissions: PPAPI permissions, to control access to private APIs. 49 // permissions: PPAPI permissions, to control access to private APIs.
50 // render_view_id: RenderView routing id, to control access to private APIs. 50 // render_view_id: RenderView routing id, to control access to private APIs.
51 // permission_bits: controls which interfaces the NaCl plugin can use. 51 // permission_bits: controls which interfaces the NaCl plugin can use.
52 // uses_irt: whether the launched process should use the IRT. 52 // uses_irt: whether the launched process should use the IRT.
53 // uses_nonsfi_mode: whether the program should be loaded under non-SFI mode. 53 // uses_nonsfi_mode: whether the program should be loaded under non-SFI mode.
54 // enable_dyncode_syscalls: whether the launched process should allow dyncode 54 // enable_dyncode_syscalls: whether the launched process should allow dyncode
55 // and mmap with PROT_EXEC. 55 // and mmap with PROT_EXEC.
56 // enable_exception_handling: whether the launched process should allow 56 // enable_exception_handling: whether the launched process should allow
57 // hardware exception handling. 57 // hardware exception handling.
58 // enable_crash_throttling: whether a crash of this process contributes 58 // enable_crash_throttling: whether a crash of this process contributes
59 // to the crash throttling statistics, and also 59 // to the crash throttling statistics, and also
60 // whether this process should not start when too 60 // whether this process should not start when too
61 // many crashes have been observed. 61 // many crashes have been observed.
62 // off_the_record: was the process launched from an incognito renderer? 62 // off_the_record: was the process launched from an incognito renderer?
63 // profile_directory: is the path of current profile directory. 63 // profile_directory: is the path of current profile directory.
64 NaClProcessHost(const GURL& manifest_url, 64 NaClProcessHost(const GURL& manifest_url,
65 base::File nexe_file, 65 base::File nexe_file,
66 uint64_t nexe_token_lo,
Mark Seaborn 2014/06/30 20:01:03 Could you pass this around as "struct NaClFileToke
teravest 2014/06/30 22:04:55 Done.
67 uint64_t nexe_token_hi,
66 ppapi::PpapiPermissions permissions, 68 ppapi::PpapiPermissions permissions,
67 int render_view_id, 69 int render_view_id,
68 uint32 permission_bits, 70 uint32 permission_bits,
69 bool uses_irt, 71 bool uses_irt,
70 bool uses_nonsfi_mode, 72 bool uses_nonsfi_mode,
71 bool enable_dyncode_syscalls, 73 bool enable_dyncode_syscalls,
72 bool enable_exception_handling, 74 bool enable_exception_handling,
73 bool enable_crash_throttling, 75 bool enable_crash_throttling,
74 bool off_the_record, 76 bool off_the_record,
75 const base::FilePath& profile_directory); 77 const base::FilePath& profile_directory);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // Called when the PPAPI IPC channels to the browser/renderer have been 184 // Called when the PPAPI IPC channels to the browser/renderer have been
183 // created. 185 // created.
184 void OnPpapiChannelsCreated( 186 void OnPpapiChannelsCreated(
185 const IPC::ChannelHandle& browser_channel_handle, 187 const IPC::ChannelHandle& browser_channel_handle,
186 const IPC::ChannelHandle& ppapi_renderer_channel_handle, 188 const IPC::ChannelHandle& ppapi_renderer_channel_handle,
187 const IPC::ChannelHandle& trusted_renderer_channel_handle, 189 const IPC::ChannelHandle& trusted_renderer_channel_handle,
188 const IPC::ChannelHandle& manifest_service_channel_handle); 190 const IPC::ChannelHandle& manifest_service_channel_handle);
189 191
190 GURL manifest_url_; 192 GURL manifest_url_;
191 base::File nexe_file_; 193 base::File nexe_file_;
194 uint64_t nexe_token_lo_;
195 uint64_t nexe_token_hi_;
192 196
193 ppapi::PpapiPermissions permissions_; 197 ppapi::PpapiPermissions permissions_;
194 198
195 #if defined(OS_WIN) 199 #if defined(OS_WIN)
196 // This field becomes true when the broker successfully launched 200 // This field becomes true when the broker successfully launched
197 // the NaCl loader. 201 // the NaCl loader.
198 bool process_launched_by_broker_; 202 bool process_launched_by_broker_;
199 #endif 203 #endif
200 // The NaClHostMessageFilter that requested this NaCl process. We use 204 // The NaClHostMessageFilter that requested this NaCl process. We use
201 // this for sending the reply once the process has started. 205 // this for sending the reply once the process has started.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 246
243 // Throttling time in milliseconds for PpapiHostMsg_Keepalive IPCs. 247 // Throttling time in milliseconds for PpapiHostMsg_Keepalive IPCs.
244 static unsigned keepalive_throttle_interval_milliseconds_; 248 static unsigned keepalive_throttle_interval_milliseconds_;
245 249
246 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); 250 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost);
247 }; 251 };
248 252
249 } // namespace nacl 253 } // namespace nacl
250 254
251 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ 255 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698