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