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

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

Issue 2387603003: Resume a backgrounded renderer that was purged and suspended (Closed)
Patch Set: Use constexpr base::TimeDelta Created 4 years, 2 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
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 <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 void MockRenderProcessHost::ForceReleaseWorkerRefCounts() { 294 void MockRenderProcessHost::ForceReleaseWorkerRefCounts() {
295 worker_ref_count_ = 0; 295 worker_ref_count_ = 0;
296 } 296 }
297 297
298 bool MockRenderProcessHost::IsWorkerRefCountDisabled() { 298 bool MockRenderProcessHost::IsWorkerRefCountDisabled() {
299 return false; 299 return false;
300 } 300 }
301 301
302 void MockRenderProcessHost::PurgeAndSuspend() {} 302 void MockRenderProcessHost::PurgeAndSuspend() {}
303 303
304 void MockRenderProcessHost::Resume() {}
305
306 const base::TimeTicks& MockRenderProcessHost::GetLastPurgedAndSuspendedTime()
307 const {
308 static base::TimeTicks dummy_time = base::TimeTicks::Now();
309 return dummy_time;
310 }
311
312 const base::TimeTicks& MockRenderProcessHost::GetLastResumedInBackgroundTime()
313 const {
314 static base::TimeTicks dummy_time = base::TimeTicks::Now();
315 return dummy_time;
316 }
317
304 void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) { 318 void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) {
305 RenderProcessHostImpl::FilterURL(this, empty_allowed, url); 319 RenderProcessHostImpl::FilterURL(this, empty_allowed, url);
306 } 320 }
307 321
308 #if defined(ENABLE_WEBRTC) 322 #if defined(ENABLE_WEBRTC)
309 void MockRenderProcessHost::EnableAudioDebugRecordings( 323 void MockRenderProcessHost::EnableAudioDebugRecordings(
310 const base::FilePath& file) { 324 const base::FilePath& file) {
311 } 325 }
312 326
313 void MockRenderProcessHost::DisableAudioDebugRecordings() {} 327 void MockRenderProcessHost::DisableAudioDebugRecordings() {}
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); 388 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin();
375 it != processes_.end(); ++it) { 389 it != processes_.end(); ++it) {
376 if (*it == host) { 390 if (*it == host) {
377 processes_.weak_erase(it); 391 processes_.weak_erase(it);
378 break; 392 break;
379 } 393 }
380 } 394 }
381 } 395 }
382 396
383 } // namespace content 397 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698