OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/nacl_host/nacl_broker_host_win.h" | 5 #include "chrome/browser/nacl_host/nacl_broker_host_win.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "ipc/ipc_switches.h" | 9 #include "ipc/ipc_switches.h" |
10 #include "chrome/browser/nacl_host/nacl_broker_service_win.h" | 10 #include "chrome/browser/nacl_host/nacl_broker_service_win.h" |
11 #include "chrome/browser/nacl_host/nacl_process_host.h" | 11 #include "chrome/browser/nacl_host/nacl_process_host.h" |
12 #include "chrome/common/chrome_constants.h" | 12 #include "chrome/common/chrome_constants.h" |
13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
14 #include "chrome/common/nacl_cmd_line.h" | 14 #include "chrome/common/nacl_cmd_line.h" |
15 #include "chrome/common/nacl_messages.h" | 15 #include "chrome/common/nacl_messages.h" |
16 | 16 |
17 NaClBrokerHost::NaClBrokerHost( | 17 NaClBrokerHost::NaClBrokerHost( |
18 ResourceDispatcherHost* resource_dispatcher_host) | 18 ResourceDispatcherHost* resource_dispatcher_host) |
19 : BrowserChildProcessHost(NACL_BROKER_PROCESS, resource_dispatcher_host), | 19 : BrowserChildProcessHost(NACL_BROKER_PROCESS, resource_dispatcher_host), |
20 stopping_(false) { | 20 stopping_(false) { |
21 } | 21 } |
22 | 22 |
23 NaClBrokerHost::~NaClBrokerHost() { | 23 NaClBrokerHost::~NaClBrokerHost() { |
24 } | 24 } |
25 | 25 |
26 URLRequestContext* NaClBrokerHost::GetRequestContext( | |
27 uint32 request_id, | |
28 const ViewHostMsg_Resource_Request& request_data) { | |
29 return NULL; | |
30 } | |
31 | |
32 bool NaClBrokerHost::Init() { | 26 bool NaClBrokerHost::Init() { |
33 // Create the channel that will be used for communicating with the broker. | 27 // Create the channel that will be used for communicating with the broker. |
34 if (!CreateChannel()) | 28 if (!CreateChannel()) |
35 return false; | 29 return false; |
36 | 30 |
37 // Create the path to the nacl broker/loader executable. | 31 // Create the path to the nacl broker/loader executable. |
38 FilePath module_path; | 32 FilePath module_path; |
39 if (!PathService::Get(base::FILE_MODULE, &module_path)) | 33 if (!PathService::Get(base::FILE_MODULE, &module_path)) |
40 return false; | 34 return false; |
41 | 35 |
(...skipping 23 matching lines...) Expand all Loading... |
65 | 59 |
66 void NaClBrokerHost::OnLoaderLaunched(const std::wstring& loader_channel_id, | 60 void NaClBrokerHost::OnLoaderLaunched(const std::wstring& loader_channel_id, |
67 base::ProcessHandle handle) { | 61 base::ProcessHandle handle) { |
68 NaClBrokerService::GetInstance()->OnLoaderLaunched(loader_channel_id, handle); | 62 NaClBrokerService::GetInstance()->OnLoaderLaunched(loader_channel_id, handle); |
69 } | 63 } |
70 | 64 |
71 void NaClBrokerHost::StopBroker() { | 65 void NaClBrokerHost::StopBroker() { |
72 stopping_ = true; | 66 stopping_ = true; |
73 Send(new NaClProcessMsg_StopBroker()); | 67 Send(new NaClProcessMsg_StopBroker()); |
74 } | 68 } |
OLD | NEW |