| 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 } | 360 } |
| 361 | 361 |
| 362 bool MockRenderProcessHost::IsUnused() { | 362 bool MockRenderProcessHost::IsUnused() { |
| 363 return is_unused_; | 363 return is_unused_; |
| 364 } | 364 } |
| 365 | 365 |
| 366 void MockRenderProcessHost::SetIsUsed() { | 366 void MockRenderProcessHost::SetIsUsed() { |
| 367 is_unused_ = false; | 367 is_unused_ = false; |
| 368 } | 368 } |
| 369 | 369 |
| 370 bool MockRenderProcessHost::HostHasNotBeenUsed() { |
| 371 return IsUnused() && listeners_.IsEmpty() && GetWorkerRefCount() == 0; |
| 372 } |
| 373 |
| 370 void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) { | 374 void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) { |
| 371 RenderProcessHostImpl::FilterURL(this, empty_allowed, url); | 375 RenderProcessHostImpl::FilterURL(this, empty_allowed, url); |
| 372 } | 376 } |
| 373 | 377 |
| 374 #if BUILDFLAG(ENABLE_WEBRTC) | 378 #if BUILDFLAG(ENABLE_WEBRTC) |
| 375 void MockRenderProcessHost::EnableAudioDebugRecordings( | 379 void MockRenderProcessHost::EnableAudioDebugRecordings( |
| 376 const base::FilePath& file) { | 380 const base::FilePath& file) { |
| 377 } | 381 } |
| 378 | 382 |
| 379 void MockRenderProcessHost::DisableAudioDebugRecordings() {} | 383 void MockRenderProcessHost::DisableAudioDebugRecordings() {} |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 for (auto it = processes_.begin(); it != processes_.end(); ++it) { | 447 for (auto it = processes_.begin(); it != processes_.end(); ++it) { |
| 444 if (it->get() == host) { | 448 if (it->get() == host) { |
| 445 it->release(); | 449 it->release(); |
| 446 processes_.erase(it); | 450 processes_.erase(it); |
| 447 break; | 451 break; |
| 448 } | 452 } |
| 449 } | 453 } |
| 450 } | 454 } |
| 451 | 455 |
| 452 } // namespace content | 456 } // namespace content |
| OLD | NEW |