OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/common/child_thread.h" | 5 #include "chrome/common/child_thread.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "chrome/common/child_process.h" | 10 #include "chrome/common/child_process.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 if (handled) | 162 if (handled) |
163 return true; | 163 return true; |
164 | 164 |
165 if (msg.routing_id() == MSG_ROUTING_CONTROL) | 165 if (msg.routing_id() == MSG_ROUTING_CONTROL) |
166 return OnControlMessageReceived(msg); | 166 return OnControlMessageReceived(msg); |
167 | 167 |
168 return router_.OnMessageReceived(msg); | 168 return router_.OnMessageReceived(msg); |
169 } | 169 } |
170 | 170 |
| 171 bool ChildThread::OnControlMessageReceived(const IPC::Message& msg) { |
| 172 return false; |
| 173 } |
| 174 |
171 void ChildThread::OnAskBeforeShutdown() { | 175 void ChildThread::OnAskBeforeShutdown() { |
172 check_with_browser_before_shutdown_ = true; | 176 check_with_browser_before_shutdown_ = true; |
173 } | 177 } |
174 | 178 |
175 void ChildThread::OnShutdown() { | 179 void ChildThread::OnShutdown() { |
176 MessageLoop::current()->Quit(); | 180 MessageLoop::current()->Quit(); |
177 } | 181 } |
178 | 182 |
179 #if defined(IPC_MESSAGE_LOG_ENABLED) | 183 #if defined(IPC_MESSAGE_LOG_ENABLED) |
180 void ChildThread::OnSetIPCLoggingEnabled(bool enable) { | 184 void ChildThread::OnSetIPCLoggingEnabled(bool enable) { |
(...skipping 13 matching lines...) Expand all Loading... |
194 MessageLoop::current()->Quit(); | 198 MessageLoop::current()->Quit(); |
195 return; | 199 return; |
196 } | 200 } |
197 | 201 |
198 // The child process shutdown sequence is a request response based mechanism, | 202 // The child process shutdown sequence is a request response based mechanism, |
199 // where we send out an initial feeler request to the child process host | 203 // where we send out an initial feeler request to the child process host |
200 // instance in the browser to verify if it's ok to shutdown the child process. | 204 // instance in the browser to verify if it's ok to shutdown the child process. |
201 // The browser then sends back a response if it's ok to shutdown. | 205 // The browser then sends back a response if it's ok to shutdown. |
202 Send(new PluginProcessHostMsg_ShutdownRequest); | 206 Send(new PluginProcessHostMsg_ShutdownRequest); |
203 } | 207 } |
OLD | NEW |