| 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 "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "components/nacl/browser/nacl_broker_service_win.h" | 10 #include "components/nacl/browser/nacl_broker_service_win.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 base::CommandLine* cmd_line = new base::CommandLine(nacl_path); | 68 base::CommandLine* cmd_line = new base::CommandLine(nacl_path); |
| 69 CopyNaClCommandLineArguments(cmd_line); | 69 CopyNaClCommandLineArguments(cmd_line); |
| 70 | 70 |
| 71 cmd_line->AppendSwitchASCII(switches::kProcessType, | 71 cmd_line->AppendSwitchASCII(switches::kProcessType, |
| 72 switches::kNaClBrokerProcess); | 72 switches::kNaClBrokerProcess); |
| 73 cmd_line->AppendSwitchASCII(switches::kMojoChannelToken, mojo_channel_token); | 73 cmd_line->AppendSwitchASCII(switches::kMojoChannelToken, mojo_channel_token); |
| 74 if (NaClBrowser::GetDelegate()->DialogsAreSuppressed()) | 74 if (NaClBrowser::GetDelegate()->DialogsAreSuppressed()) |
| 75 cmd_line->AppendSwitch(switches::kNoErrorDialogs); | 75 cmd_line->AppendSwitch(switches::kNoErrorDialogs); |
| 76 | 76 |
| 77 process_->Launch(new NaClBrokerSandboxedProcessLauncherDelegate, | 77 process_->Launch(new NaClBrokerSandboxedProcessLauncherDelegate, |
| 78 #if defined(OS_WIN) |
| 79 NULL, |
| 80 #endif |
| 78 cmd_line, | 81 cmd_line, |
| 79 true); | 82 true); |
| 80 return true; | 83 return true; |
| 81 } | 84 } |
| 82 | 85 |
| 83 bool NaClBrokerHost::OnMessageReceived(const IPC::Message& msg) { | 86 bool NaClBrokerHost::OnMessageReceived(const IPC::Message& msg) { |
| 84 bool handled = true; | 87 bool handled = true; |
| 85 IPC_BEGIN_MESSAGE_MAP(NaClBrokerHost, msg) | 88 IPC_BEGIN_MESSAGE_MAP(NaClBrokerHost, msg) |
| 86 IPC_MESSAGE_HANDLER(NaClProcessMsg_LoaderLaunched, OnLoaderLaunched) | 89 IPC_MESSAGE_HANDLER(NaClProcessMsg_LoaderLaunched, OnLoaderLaunched) |
| 87 IPC_MESSAGE_HANDLER(NaClProcessMsg_DebugExceptionHandlerLaunched, | 90 IPC_MESSAGE_HANDLER(NaClProcessMsg_DebugExceptionHandlerLaunched, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 NaClBrokerService::GetInstance()->OnDebugExceptionHandlerLaunched(pid, | 124 NaClBrokerService::GetInstance()->OnDebugExceptionHandlerLaunched(pid, |
| 122 success); | 125 success); |
| 123 } | 126 } |
| 124 | 127 |
| 125 void NaClBrokerHost::StopBroker() { | 128 void NaClBrokerHost::StopBroker() { |
| 126 is_terminating_ = true; | 129 is_terminating_ = true; |
| 127 process_->Send(new NaClProcessMsg_StopBroker()); | 130 process_->Send(new NaClProcessMsg_StopBroker()); |
| 128 } | 131 } |
| 129 | 132 |
| 130 } // namespace nacl | 133 } // namespace nacl |
| OLD | NEW |