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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 private: | 100 private: |
101 // Internal class that holds the NaClHandle objecs so that | 101 // Internal class that holds the NaClHandle objecs so that |
102 // nacl_process_host.h doesn't include NaCl headers. Needed since it's | 102 // nacl_process_host.h doesn't include NaCl headers. Needed since it's |
103 // included by src\content, which can't depend on the NaCl gyp file because it | 103 // included by src\content, which can't depend on the NaCl gyp file because it |
104 // depends on chrome.gyp (circular dependency). | 104 // depends on chrome.gyp (circular dependency). |
105 struct NaClInternal; | 105 struct NaClInternal; |
106 | 106 |
107 bool LaunchNaClGdb(); | 107 bool LaunchNaClGdb(); |
108 | 108 |
| 109 // Mark the process as using a particular GDB debug stub port and notify |
| 110 // listeners. |
| 111 void SetDebugStubPort(uint16_t port); |
| 112 |
109 #if defined(OS_POSIX) | 113 #if defined(OS_POSIX) |
110 // Create bound TCP socket in the browser process so that the NaCl GDB debug | 114 // Create bound TCP socket in the browser process so that the NaCl GDB debug |
111 // stub can use it to accept incoming connections even when the Chrome sandbox | 115 // stub can use it to accept incoming connections even when the Chrome sandbox |
112 // is enabled. | 116 // is enabled. |
113 net::SocketDescriptor GetDebugStubSocketHandle(); | 117 net::SocketDescriptor GetDebugStubSocketHandle(); |
114 #endif | 118 #endif |
| 119 |
| 120 #if defined(OS_WIN) |
| 121 // Called when the debug stub port has been selected. |
| 122 void OnDebugStubPortSelected(uint16_t debug_stub_port); |
| 123 #endif |
| 124 |
115 bool LaunchSelLdr(); | 125 bool LaunchSelLdr(); |
116 | 126 |
117 // BrowserChildProcessHostDelegate implementation: | 127 // BrowserChildProcessHostDelegate implementation: |
118 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 128 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
119 virtual void OnProcessLaunched() OVERRIDE; | 129 virtual void OnProcessLaunched() OVERRIDE; |
120 | 130 |
121 void OnResourcesReady(); | 131 void OnResourcesReady(); |
122 | 132 |
123 // 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. |
124 bool enable_ppapi_proxy() { return render_view_id_ != 0; } | 134 bool enable_ppapi_proxy() { return render_view_id_ != 0; } |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 236 |
227 // Throttling time in milliseconds for PpapiHostMsg_Keepalive IPCs. | 237 // Throttling time in milliseconds for PpapiHostMsg_Keepalive IPCs. |
228 static unsigned keepalive_throttle_interval_milliseconds_; | 238 static unsigned keepalive_throttle_interval_milliseconds_; |
229 | 239 |
230 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); | 240 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); |
231 }; | 241 }; |
232 | 242 |
233 } // namespace nacl | 243 } // namespace nacl |
234 | 244 |
235 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ | 245 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ |
OLD | NEW |