OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/logging_chrome.h" | 14 #include "chrome/common/logging_chrome.h" |
15 #include "chrome/common/nacl_cmd_line.h" | 15 #include "chrome/common/nacl_cmd_line.h" |
16 #include "chrome/common/nacl_messages.h" | 16 #include "chrome/common/nacl_messages.h" |
17 | 17 |
18 NaClBrokerHost::NaClBrokerHost() | 18 NaClBrokerHost::NaClBrokerHost() |
19 : BrowserChildProcessHost(NACL_BROKER_PROCESS), | 19 : BrowserChildProcessHost(content::PROCESS_TYPE_NACL_BROKER), |
20 stopping_(false) { | 20 stopping_(false) { |
21 } | 21 } |
22 | 22 |
23 NaClBrokerHost::~NaClBrokerHost() { | 23 NaClBrokerHost::~NaClBrokerHost() { |
24 } | 24 } |
25 | 25 |
26 bool NaClBrokerHost::Init() { | 26 bool NaClBrokerHost::Init() { |
27 // 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. |
28 if (!CreateChannel()) | 28 if (!CreateChannel()) |
29 return false; | 29 return false; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 void NaClBrokerHost::OnLoaderLaunched(const std::wstring& loader_channel_id, | 64 void NaClBrokerHost::OnLoaderLaunched(const std::wstring& loader_channel_id, |
65 base::ProcessHandle handle) { | 65 base::ProcessHandle handle) { |
66 NaClBrokerService::GetInstance()->OnLoaderLaunched(loader_channel_id, handle); | 66 NaClBrokerService::GetInstance()->OnLoaderLaunched(loader_channel_id, handle); |
67 } | 67 } |
68 | 68 |
69 void NaClBrokerHost::StopBroker() { | 69 void NaClBrokerHost::StopBroker() { |
70 stopping_ = true; | 70 stopping_ = true; |
71 Send(new NaClProcessMsg_StopBroker()); | 71 Send(new NaClProcessMsg_StopBroker()); |
72 } | 72 } |
OLD | NEW |