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