OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 return FastShutdownIfPossible(); | 198 return FastShutdownIfPossible(); |
199 return false; | 199 return false; |
200 } | 200 } |
201 | 201 |
202 base::TimeDelta MockRenderProcessHost::GetChildProcessIdleTime() const { | 202 base::TimeDelta MockRenderProcessHost::GetChildProcessIdleTime() const { |
203 return base::TimeDelta::FromMilliseconds(0); | 203 return base::TimeDelta::FromMilliseconds(0); |
204 } | 204 } |
205 | 205 |
206 content::RenderProcessHost::listeners_iterator | 206 content::RenderProcessHost::listeners_iterator |
207 MockRenderProcessHost::ListenersIterator() { | 207 MockRenderProcessHost::ListenersIterator() { |
208 IDMap<IPC::Channel::Listener> listeners; | 208 return listeners_iterator(&listeners_); |
209 return listeners_iterator(&listeners); | |
210 } | 209 } |
211 | 210 |
212 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { | 211 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { |
213 return false; | 212 return false; |
214 } | 213 } |
215 | 214 |
216 void MockRenderProcessHost::OnChannelConnected(int32 peer_pid) { | 215 void MockRenderProcessHost::OnChannelConnected(int32 peer_pid) { |
217 } | 216 } |
218 | 217 |
219 MockRenderProcessHostFactory::MockRenderProcessHostFactory() {} | 218 MockRenderProcessHostFactory::MockRenderProcessHostFactory() {} |
(...skipping 20 matching lines...) Expand all Loading... |
240 | 239 |
241 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { | 240 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { |
242 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 241 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
243 it != processes_.end(); ++it) { | 242 it != processes_.end(); ++it) { |
244 if (*it == host) { | 243 if (*it == host) { |
245 processes_.weak_erase(it); | 244 processes_.weak_erase(it); |
246 break; | 245 break; |
247 } | 246 } |
248 } | 247 } |
249 } | 248 } |
OLD | NEW |