| 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/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 "content/common/child_process.h" | 10 #include "content/common/child_process.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 resource_dispatcher_.reset(new ResourceDispatcher(this)); | 53 resource_dispatcher_.reset(new ResourceDispatcher(this)); |
| 54 socket_stream_dispatcher_.reset(new SocketStreamDispatcher()); | 54 socket_stream_dispatcher_.reset(new SocketStreamDispatcher()); |
| 55 file_system_dispatcher_.reset(new FileSystemDispatcher()); | 55 file_system_dispatcher_.reset(new FileSystemDispatcher()); |
| 56 | 56 |
| 57 sync_message_filter_ = | 57 sync_message_filter_ = |
| 58 new IPC::SyncMessageFilter(ChildProcess::current()->GetShutDownEvent()); | 58 new IPC::SyncMessageFilter(ChildProcess::current()->GetShutDownEvent()); |
| 59 channel_->AddFilter(sync_message_filter_.get()); | 59 channel_->AddFilter(sync_message_filter_.get()); |
| 60 | 60 |
| 61 #if !defined(NACL_WIN64) | 61 #if !defined(NACL_WIN64) |
| 62 // Currently, the NaCl 64 DLL build requires a lot of extra dependencies to | 62 // This brings in a depenency on gpu, which isn't linked in with NaCl's win64 |
| 63 // support IPC messages with parameters, so until there's a need for trace in | 63 // build. |
| 64 // NaCl, this is reserved for non-NaCl builds. | |
| 65 channel_->AddFilter(new ChildTraceMessageFilter()); | 64 channel_->AddFilter(new ChildTraceMessageFilter()); |
| 66 #endif | 65 #endif |
| 67 | 66 |
| 68 // When running in unit tests, there is already a NotificationService object. | 67 // When running in unit tests, there is already a NotificationService object. |
| 69 // Since only one can exist at a time per thread, check first. | 68 // Since only one can exist at a time per thread, check first. |
| 70 if (!NotificationService::current()) | 69 if (!NotificationService::current()) |
| 71 notification_service_.reset(new NotificationService); | 70 notification_service_.reset(new NotificationService); |
| 72 } | 71 } |
| 73 | 72 |
| 74 ChildThread::~ChildThread() { | 73 ChildThread::~ChildThread() { |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 MessageLoop::current()->Quit(); | 201 MessageLoop::current()->Quit(); |
| 203 return; | 202 return; |
| 204 } | 203 } |
| 205 | 204 |
| 206 // The child process shutdown sequence is a request response based mechanism, | 205 // The child process shutdown sequence is a request response based mechanism, |
| 207 // where we send out an initial feeler request to the child process host | 206 // where we send out an initial feeler request to the child process host |
| 208 // instance in the browser to verify if it's ok to shutdown the child process. | 207 // instance in the browser to verify if it's ok to shutdown the child process. |
| 209 // The browser then sends back a response if it's ok to shutdown. | 208 // The browser then sends back a response if it's ok to shutdown. |
| 210 Send(new ChildProcessHostMsg_ShutdownRequest); | 209 Send(new ChildProcessHostMsg_ShutdownRequest); |
| 211 } | 210 } |
| OLD | NEW |