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/public/test/mock_render_process_host.h" | 5 #include "content/public/test/mock_render_process_host.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "content/browser/child_process_security_policy_impl.h" | 10 #include "content/browser/child_process_security_policy_impl.h" |
11 #include "content/browser/renderer_host/render_process_host_impl.h" | 11 #include "content/browser/renderer_host/render_process_host_impl.h" |
12 #include "content/browser/renderer_host/render_view_host_impl.h" | 12 #include "content/browser/renderer_host/render_view_host_impl.h" |
13 #include "content/browser/renderer_host/render_widget_host_impl.h" | 13 #include "content/browser/renderer_host/render_widget_host_impl.h" |
14 #include "content/common/child_process_host_impl.h" | 14 #include "content/common/child_process_host_impl.h" |
| 15 #include "content/public/browser/global_request_id.h" |
15 #include "content/public/browser/notification_service.h" | 16 #include "content/public/browser/notification_service.h" |
16 #include "content/public/browser/notification_types.h" | 17 #include "content/public/browser/notification_types.h" |
17 #include "content/public/browser/render_widget_host_iterator.h" | 18 #include "content/public/browser/render_widget_host_iterator.h" |
18 #include "content/public/browser/storage_partition.h" | 19 #include "content/public/browser/storage_partition.h" |
19 | 20 |
20 namespace content { | 21 namespace content { |
21 | 22 |
22 MockRenderProcessHost::MockRenderProcessHost(BrowserContext* browser_context) | 23 MockRenderProcessHost::MockRenderProcessHost(BrowserContext* browser_context) |
23 : transport_dib_(NULL), | 24 : transport_dib_(NULL), |
24 bad_msg_count_(0), | 25 bad_msg_count_(0), |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 base::TimeDelta MockRenderProcessHost::GetChildProcessIdleTime() const { | 249 base::TimeDelta MockRenderProcessHost::GetChildProcessIdleTime() const { |
249 return base::TimeDelta::FromMilliseconds(0); | 250 return base::TimeDelta::FromMilliseconds(0); |
250 } | 251 } |
251 | 252 |
252 void MockRenderProcessHost::SurfaceUpdated(int32 surface_id) { | 253 void MockRenderProcessHost::SurfaceUpdated(int32 surface_id) { |
253 } | 254 } |
254 | 255 |
255 void MockRenderProcessHost::ResumeRequestsForView(int route_id) { | 256 void MockRenderProcessHost::ResumeRequestsForView(int route_id) { |
256 } | 257 } |
257 | 258 |
| 259 void MockRenderProcessHost::ResumeDeferredNavigation( |
| 260 const GlobalRequestID& request_id) { |
| 261 } |
258 | 262 |
259 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { | 263 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { |
260 IPC::Listener* listener = listeners_.Lookup(msg.routing_id()); | 264 IPC::Listener* listener = listeners_.Lookup(msg.routing_id()); |
261 if (listener) | 265 if (listener) |
262 return listener->OnMessageReceived(msg); | 266 return listener->OnMessageReceived(msg); |
263 return false; | 267 return false; |
264 } | 268 } |
265 | 269 |
266 void MockRenderProcessHost::OnChannelConnected(int32 peer_pid) { | 270 void MockRenderProcessHost::OnChannelConnected(int32 peer_pid) { |
267 } | 271 } |
(...skipping 24 matching lines...) Expand all Loading... |
292 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 296 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
293 it != processes_.end(); ++it) { | 297 it != processes_.end(); ++it) { |
294 if (*it == host) { | 298 if (*it == host) { |
295 processes_.weak_erase(it); | 299 processes_.weak_erase(it); |
296 break; | 300 break; |
297 } | 301 } |
298 } | 302 } |
299 } | 303 } |
300 | 304 |
301 } // content | 305 } // content |
OLD | NEW |