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 "chrome/nacl/nacl_broker_listener.h" | 5 #include "chrome/nacl/nacl_broker_listener.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/message_loop_proxy.h" | 11 #include "base/message_loop_proxy.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/process_util.h" | 13 #include "base/process_util.h" |
14 #include "chrome/common/nacl_cmd_line.h" | 14 #include "chrome/common/nacl_cmd_line.h" |
15 #include "chrome/common/nacl_debug_exception_handler_win.h" | 15 #include "chrome/common/nacl_debug_exception_handler_win.h" |
16 #include "chrome/common/nacl_messages.h" | 16 #include "chrome/common/nacl_messages.h" |
17 #include "content/public/common/content_switches.h" | 17 #include "content/public/common/content_switches.h" |
18 #include "content/public/common/sandbox_init.h" | 18 #include "content/public/common/sandbox_init.h" |
| 19 #include "ipc/ipc_channel.h" |
19 #include "ipc/ipc_switches.h" | 20 #include "ipc/ipc_switches.h" |
20 | 21 |
21 namespace { | 22 namespace { |
22 | 23 |
23 void SendReply(IPC::Channel* channel, int32 pid, bool result) { | 24 void SendReply(IPC::Channel* channel, int32 pid, bool result) { |
24 channel->Send(new NaClProcessMsg_DebugExceptionHandlerLaunched(pid, result)); | 25 channel->Send(new NaClProcessMsg_DebugExceptionHandlerLaunched(pid, result)); |
25 } | 26 } |
26 | 27 |
27 } // namespace | 28 } // namespace |
28 | 29 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 const std::string& startup_info) { | 104 const std::string& startup_info) { |
104 NaClStartDebugExceptionHandlerThread( | 105 NaClStartDebugExceptionHandlerThread( |
105 process_handle, startup_info, | 106 process_handle, startup_info, |
106 base::MessageLoopProxy::current(), | 107 base::MessageLoopProxy::current(), |
107 base::Bind(SendReply, channel_.get(), pid)); | 108 base::Bind(SendReply, channel_.get(), pid)); |
108 } | 109 } |
109 | 110 |
110 void NaClBrokerListener::OnStopBroker() { | 111 void NaClBrokerListener::OnStopBroker() { |
111 MessageLoop::current()->Quit(); | 112 MessageLoop::current()->Quit(); |
112 } | 113 } |
OLD | NEW |