| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 bool enable_crash_throttling, | 71 bool enable_crash_throttling, |
| 72 bool off_the_record, | 72 bool off_the_record, |
| 73 const base::FilePath& profile_directory); | 73 const base::FilePath& profile_directory); |
| 74 virtual ~NaClProcessHost(); | 74 virtual ~NaClProcessHost(); |
| 75 | 75 |
| 76 virtual void OnProcessCrashed(int exit_status) OVERRIDE; | 76 virtual void OnProcessCrashed(int exit_status) OVERRIDE; |
| 77 | 77 |
| 78 // Do any minimal work that must be done at browser startup. | 78 // Do any minimal work that must be done at browser startup. |
| 79 static void EarlyStartup(); | 79 static void EarlyStartup(); |
| 80 | 80 |
| 81 // Specifies throttling time in milliseconds for PpapiHostMsg_Keepalive IPCs. |
| 82 static void SetPpapiKeepAliveThrottleForTesting(unsigned milliseconds); |
| 83 |
| 81 // Initialize the new NaCl process. Result is returned by sending ipc | 84 // Initialize the new NaCl process. Result is returned by sending ipc |
| 82 // message reply_msg. | 85 // message reply_msg. |
| 83 void Launch(NaClHostMessageFilter* nacl_host_message_filter, | 86 void Launch(NaClHostMessageFilter* nacl_host_message_filter, |
| 84 IPC::Message* reply_msg, | 87 IPC::Message* reply_msg, |
| 85 const base::FilePath& manifest_path); | 88 const base::FilePath& manifest_path); |
| 86 | 89 |
| 87 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 90 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
| 88 | 91 |
| 89 #if defined(OS_WIN) | 92 #if defined(OS_WIN) |
| 90 void OnProcessLaunchedByBroker(base::ProcessHandle handle); | 93 void OnProcessLaunchedByBroker(base::ProcessHandle handle); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 216 |
| 214 const base::FilePath profile_directory_; | 217 const base::FilePath profile_directory_; |
| 215 | 218 |
| 216 // Channel proxy to terminate the NaCl-Browser PPAPI channel. | 219 // Channel proxy to terminate the NaCl-Browser PPAPI channel. |
| 217 scoped_ptr<IPC::ChannelProxy> ipc_proxy_channel_; | 220 scoped_ptr<IPC::ChannelProxy> ipc_proxy_channel_; |
| 218 // Browser host for plugin process. | 221 // Browser host for plugin process. |
| 219 scoped_ptr<content::BrowserPpapiHost> ppapi_host_; | 222 scoped_ptr<content::BrowserPpapiHost> ppapi_host_; |
| 220 | 223 |
| 221 int render_view_id_; | 224 int render_view_id_; |
| 222 | 225 |
| 226 // Throttling time in milliseconds for PpapiHostMsg_Keepalive IPCs. |
| 227 static unsigned keepalive_throttle_interval_milliseconds_; |
| 228 |
| 223 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); | 229 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); |
| 224 }; | 230 }; |
| 225 | 231 |
| 226 } // namespace nacl | 232 } // namespace nacl |
| 227 | 233 |
| 228 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ | 234 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ |
| OLD | NEW |