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 "content/common/child_thread.h" | 5 #include "content/common/child_thread.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/process.h" | 9 #include "base/process.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 return; | 245 return; |
246 #endif | 246 #endif |
247 | 247 |
248 NOTIMPLEMENTED(); | 248 NOTIMPLEMENTED(); |
249 } | 249 } |
250 | 250 |
251 ChildThread* ChildThread::current() { | 251 ChildThread* ChildThread::current() { |
252 return ChildProcess::current()->main_thread(); | 252 return ChildProcess::current()->main_thread(); |
253 } | 253 } |
254 | 254 |
| 255 bool ChildThread::IsWebFrameValid(WebKit::WebFrame* frame) { |
| 256 // Return false so that it is overridden in any process in which it is used. |
| 257 return false; |
| 258 } |
| 259 |
255 void ChildThread::OnProcessFinalRelease() { | 260 void ChildThread::OnProcessFinalRelease() { |
256 if (on_channel_error_called_) { | 261 if (on_channel_error_called_) { |
257 MessageLoop::current()->Quit(); | 262 MessageLoop::current()->Quit(); |
258 return; | 263 return; |
259 } | 264 } |
260 | 265 |
261 // The child process shutdown sequence is a request response based mechanism, | 266 // The child process shutdown sequence is a request response based mechanism, |
262 // where we send out an initial feeler request to the child process host | 267 // where we send out an initial feeler request to the child process host |
263 // instance in the browser to verify if it's ok to shutdown the child process. | 268 // instance in the browser to verify if it's ok to shutdown the child process. |
264 // The browser then sends back a response if it's ok to shutdown. This avoids | 269 // The browser then sends back a response if it's ok to shutdown. This avoids |
265 // race conditions if the process refcount is 0 but there's an IPC message | 270 // race conditions if the process refcount is 0 but there's an IPC message |
266 // inflight that would addref it. | 271 // inflight that would addref it. |
267 Send(new ChildProcessHostMsg_ShutdownRequest); | 272 Send(new ChildProcessHostMsg_ShutdownRequest); |
268 } | 273 } |
OLD | NEW |