OLD | NEW |
---|---|
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 25 matching lines...) Expand all Loading... | |
36 void* AllocateAddressSpaceASLR(base::ProcessHandle process, size_t size); | 36 void* AllocateAddressSpaceASLR(base::ProcessHandle process, size_t size); |
37 | 37 |
38 // Represents the browser side of the browser <--> NaCl communication | 38 // Represents the browser side of the browser <--> NaCl communication |
39 // channel. There will be one NaClProcessHost per NaCl process | 39 // channel. There will be one NaClProcessHost per NaCl process |
40 // The browser is responsible for starting the NaCl process | 40 // The browser is responsible for starting the NaCl process |
41 // when requested by the renderer. | 41 // when requested by the renderer. |
42 // After that, most of the communication is directly between NaCl plugin | 42 // After that, most of the communication is directly between NaCl plugin |
43 // running in the renderer and NaCl processes. | 43 // running in the renderer and NaCl processes. |
44 class NaClProcessHost : public content::BrowserChildProcessHostDelegate { | 44 class NaClProcessHost : public content::BrowserChildProcessHostDelegate { |
45 public: | 45 public: |
46 // document_url: The URL of the document of the Native Client plugin being | |
dmichael (off chromium)
2014/06/13 21:07:26
document containing the...?
teravest
2014/06/13 21:13:00
Done.
| |
47 // executed. | |
46 // manifest_url: the URL of the manifest of the Native Client plugin being | 48 // manifest_url: the URL of the manifest of the Native Client plugin being |
47 // executed. | 49 // executed. |
50 // render_process_id: Render process id, to control access to private APIs. | |
48 // render_view_id: RenderView routing id, to control access to private APIs. | 51 // render_view_id: RenderView routing id, to control access to private APIs. |
49 // permission_bits: controls which interfaces the NaCl plugin can use. | 52 // permission_bits: controls which interfaces the NaCl plugin can use. |
50 // uses_irt: whether the launched process should use the IRT. | 53 // uses_irt: whether the launched process should use the IRT. |
51 // uses_nonsfi_mode: whether the program should be loaded under non-SFI mode. | 54 // uses_nonsfi_mode: whether the program should be loaded under non-SFI mode. |
52 // enable_dyncode_syscalls: whether the launched process should allow dyncode | 55 // enable_dyncode_syscalls: whether the launched process should allow dyncode |
53 // and mmap with PROT_EXEC. | 56 // and mmap with PROT_EXEC. |
54 // enable_exception_handling: whether the launched process should allow | 57 // enable_exception_handling: whether the launched process should allow |
55 // hardware exception handling. | 58 // hardware exception handling. |
56 // enable_crash_throttling: whether a crash of this process contributes | 59 // enable_crash_throttling: whether a crash of this process contributes |
57 // to the crash throttling statistics, and also | 60 // to the crash throttling statistics, and also |
58 // whether this process should not start when too | 61 // whether this process should not start when too |
59 // many crashes have been observed. | 62 // many crashes have been observed. |
60 // off_the_record: was the process launched from an incognito renderer? | 63 // off_the_record: was the process launched from an incognito renderer? |
61 // profile_directory: is the path of current profile directory. | 64 // profile_directory: is the path of current profile directory. |
62 NaClProcessHost(const GURL& manifest_url, | 65 NaClProcessHost(const GURL& document_url, |
66 const GURL& manifest_url, | |
67 int render_process_id, | |
63 int render_view_id, | 68 int render_view_id, |
64 uint32 permission_bits, | 69 uint32 permission_bits, |
65 bool uses_irt, | 70 bool uses_irt, |
66 bool uses_nonsfi_mode, | 71 bool uses_nonsfi_mode, |
67 bool enable_dyncode_syscalls, | 72 bool enable_dyncode_syscalls, |
68 bool enable_exception_handling, | 73 bool enable_exception_handling, |
69 bool enable_crash_throttling, | 74 bool enable_crash_throttling, |
70 bool off_the_record, | 75 bool off_the_record, |
71 const base::FilePath& profile_directory); | 76 const base::FilePath& profile_directory); |
72 virtual ~NaClProcessHost(); | 77 virtual ~NaClProcessHost(); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
236 | 241 |
237 // Throttling time in milliseconds for PpapiHostMsg_Keepalive IPCs. | 242 // Throttling time in milliseconds for PpapiHostMsg_Keepalive IPCs. |
238 static unsigned keepalive_throttle_interval_milliseconds_; | 243 static unsigned keepalive_throttle_interval_milliseconds_; |
239 | 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_ |
OLD | NEW |