| 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/browser/renderer_host/mock_render_process_host.h" | 5 #include "content/browser/renderer_host/mock_render_process_host.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "content/browser/child_process_security_policy.h" | 10 #include "content/browser/child_process_security_policy.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 return FastShutdownIfPossible(); | 200 return FastShutdownIfPossible(); |
| 201 return false; | 201 return false; |
| 202 } | 202 } |
| 203 | 203 |
| 204 base::TimeDelta MockRenderProcessHost::GetChildProcessIdleTime() const { | 204 base::TimeDelta MockRenderProcessHost::GetChildProcessIdleTime() const { |
| 205 return base::TimeDelta::FromMilliseconds(0); | 205 return base::TimeDelta::FromMilliseconds(0); |
| 206 } | 206 } |
| 207 | 207 |
| 208 content::RenderProcessHost::listeners_iterator | 208 content::RenderProcessHost::listeners_iterator |
| 209 MockRenderProcessHost::ListenersIterator() { | 209 MockRenderProcessHost::ListenersIterator() { |
| 210 IDMap<IPC::Channel::Listener> listeners; | 210 return listeners_iterator(&listeners_); |
| 211 return listeners_iterator(&listeners); | |
| 212 } | 211 } |
| 213 | 212 |
| 214 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { | 213 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { |
| 215 return false; | 214 return false; |
| 216 } | 215 } |
| 217 | 216 |
| 218 void MockRenderProcessHost::OnChannelConnected(int32 peer_pid) { | 217 void MockRenderProcessHost::OnChannelConnected(int32 peer_pid) { |
| 219 } | 218 } |
| 220 | 219 |
| 221 MockRenderProcessHostFactory::MockRenderProcessHostFactory() {} | 220 MockRenderProcessHostFactory::MockRenderProcessHostFactory() {} |
| (...skipping 20 matching lines...) Expand all Loading... |
| 242 | 241 |
| 243 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { | 242 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { |
| 244 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 243 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
| 245 it != processes_.end(); ++it) { | 244 it != processes_.end(); ++it) { |
| 246 if (*it == host) { | 245 if (*it == host) { |
| 247 processes_.weak_erase(it); | 246 processes_.weak_erase(it); |
| 248 break; | 247 break; |
| 249 } | 248 } |
| 250 } | 249 } |
| 251 } | 250 } |
| OLD | NEW |