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 #include "components/nacl/browser/nacl_broker_host_win.h" | 5 #include "components/nacl/browser/nacl_broker_host_win.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "components/nacl/browser/nacl_broker_service_win.h" | 9 #include "components/nacl/browser/nacl_broker_service_win.h" |
10 #include "components/nacl/browser/nacl_browser.h" | 10 #include "components/nacl/browser/nacl_browser.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 private: | 34 private: |
35 DISALLOW_COPY_AND_ASSIGN(NaClBrokerSandboxedProcessLauncherDelegate); | 35 DISALLOW_COPY_AND_ASSIGN(NaClBrokerSandboxedProcessLauncherDelegate); |
36 }; | 36 }; |
37 } // namespace | 37 } // namespace |
38 | 38 |
39 namespace nacl { | 39 namespace nacl { |
40 | 40 |
41 NaClBrokerHost::NaClBrokerHost() : is_terminating_(false) { | 41 NaClBrokerHost::NaClBrokerHost() : is_terminating_(false) { |
42 process_.reset(content::BrowserChildProcessHost::Create( | 42 process_.reset(content::BrowserChildProcessHost::Create( |
43 PROCESS_TYPE_NACL_BROKER, this)); | 43 static_cast<content::ProcessType>(PROCESS_TYPE_NACL_BROKER), this)); |
44 } | 44 } |
45 | 45 |
46 NaClBrokerHost::~NaClBrokerHost() { | 46 NaClBrokerHost::~NaClBrokerHost() { |
47 } | 47 } |
48 | 48 |
49 bool NaClBrokerHost::Init() { | 49 bool NaClBrokerHost::Init() { |
50 // Create the channel that will be used for communicating with the broker. | 50 // Create the channel that will be used for communicating with the broker. |
51 std::string channel_id = process_->GetHost()->CreateChannel(); | 51 std::string channel_id = process_->GetHost()->CreateChannel(); |
52 if (channel_id.empty()) | 52 if (channel_id.empty()) |
53 return false; | 53 return false; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 NaClBrokerService::GetInstance()->OnDebugExceptionHandlerLaunched(pid, | 109 NaClBrokerService::GetInstance()->OnDebugExceptionHandlerLaunched(pid, |
110 success); | 110 success); |
111 } | 111 } |
112 | 112 |
113 void NaClBrokerHost::StopBroker() { | 113 void NaClBrokerHost::StopBroker() { |
114 is_terminating_ = true; | 114 is_terminating_ = true; |
115 process_->Send(new NaClProcessMsg_StopBroker()); | 115 process_->Send(new NaClProcessMsg_StopBroker()); |
116 } | 116 } |
117 | 117 |
118 } // namespace nacl | 118 } // namespace nacl |
OLD | NEW |