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_process_host.h" | 5 #include "chrome/common/child_process_host.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 Notify(NotificationType::CHILD_PROCESS_HOST_DISCONNECTED); | 112 Notify(NotificationType::CHILD_PROCESS_HOST_DISCONNECTED); |
113 #endif | 113 #endif |
114 | 114 |
115 delete this; | 115 delete this; |
116 } | 116 } |
117 | 117 |
118 ChildProcessHost::ListenerHook::ListenerHook(ChildProcessHost* host) | 118 ChildProcessHost::ListenerHook::ListenerHook(ChildProcessHost* host) |
119 : host_(host) { | 119 : host_(host) { |
120 } | 120 } |
121 | 121 |
122 void ChildProcessHost::ListenerHook::OnMessageReceived(const IPC::Message& msg)
{ | 122 void ChildProcessHost::ListenerHook::OnMessageReceived( |
| 123 const IPC::Message& msg) { |
123 #ifdef IPC_MESSAGE_LOG_ENABLED | 124 #ifdef IPC_MESSAGE_LOG_ENABLED |
124 IPC::Logging* logger = IPC::Logging::current(); | 125 IPC::Logging* logger = IPC::Logging::current(); |
125 if (msg.type() == IPC_LOGGING_ID) { | 126 if (msg.type() == IPC_LOGGING_ID) { |
126 logger->OnReceivedLoggingMessage(msg); | 127 logger->OnReceivedLoggingMessage(msg); |
127 return; | 128 return; |
128 } | 129 } |
129 | 130 |
130 if (logger->Enabled()) | 131 if (logger->Enabled()) |
131 logger->OnPreDispatchMessage(msg); | 132 logger->OnPreDispatchMessage(msg); |
132 #endif | 133 #endif |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 182 |
182 return *iterator_; | 183 return *iterator_; |
183 } while (true); | 184 } while (true); |
184 | 185 |
185 return NULL; | 186 return NULL; |
186 } | 187 } |
187 | 188 |
188 bool ChildProcessHost::Iterator::Done() { | 189 bool ChildProcessHost::Iterator::Done() { |
189 return iterator_ == Singleton<ChildProcessList>::get()->end(); | 190 return iterator_ == Singleton<ChildProcessList>::get()->end(); |
190 } | 191 } |
OLD | NEW |