Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: content/public/test/mock_render_process_host.cc

Issue 88503002: Have the unload event execute in background on cross-site navigations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Charlie's comments Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/render_widget_host_iterator.h" 16 #include "content/public/browser/render_widget_host_iterator.h"
16 #include "content/public/browser/storage_partition.h" 17 #include "content/public/browser/storage_partition.h"
17 18
18 namespace content { 19 namespace content {
19 20
20 MockRenderProcessHost::MockRenderProcessHost(BrowserContext* browser_context) 21 MockRenderProcessHost::MockRenderProcessHost(BrowserContext* browser_context)
21 : transport_dib_(NULL), 22 : transport_dib_(NULL),
22 bad_msg_count_(0), 23 bad_msg_count_(0),
23 factory_(NULL), 24 factory_(NULL),
24 id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()), 25 id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()),
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 } 257 }
257 258
258 void MockRenderProcessHost::DisableAecDump() { 259 void MockRenderProcessHost::DisableAecDump() {
259 } 260 }
260 261
261 void MockRenderProcessHost::SetWebRtcLogMessageCallback( 262 void MockRenderProcessHost::SetWebRtcLogMessageCallback(
262 base::Callback<void(const std::string&)> callback) { 263 base::Callback<void(const std::string&)> callback) {
263 } 264 }
264 #endif 265 #endif
265 266
267 void MockRenderProcessHost::ResumeDeferredNavigation(
268 const GlobalRequestID& request_id) {}
269
266 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { 270 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) {
267 IPC::Listener* listener = listeners_.Lookup(msg.routing_id()); 271 IPC::Listener* listener = listeners_.Lookup(msg.routing_id());
268 if (listener) 272 if (listener)
269 return listener->OnMessageReceived(msg); 273 return listener->OnMessageReceived(msg);
270 return false; 274 return false;
271 } 275 }
272 276
273 void MockRenderProcessHost::OnChannelConnected(int32 peer_pid) { 277 void MockRenderProcessHost::OnChannelConnected(int32 peer_pid) {
274 } 278 }
275 279
(...skipping 23 matching lines...) Expand all
299 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); 303 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin();
300 it != processes_.end(); ++it) { 304 it != processes_.end(); ++it) {
301 if (*it == host) { 305 if (*it == host) {
302 processes_.weak_erase(it); 306 processes_.weak_erase(it);
303 break; 307 break;
304 } 308 }
305 } 309 }
306 } 310 }
307 311
308 } // content 312 } // content
OLDNEW
« no previous file with comments | « content/public/test/mock_render_process_host.h ('k') | content/public/test/test_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698