| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 const base::TimeTicks& MockRenderProcessHost::GetInitTimeForNavigationMetrics() | 268 const base::TimeTicks& MockRenderProcessHost::GetInitTimeForNavigationMetrics() |
| 269 const { | 269 const { |
| 270 static base::TimeTicks dummy_time = base::TimeTicks::Now(); | 270 static base::TimeTicks dummy_time = base::TimeTicks::Now(); |
| 271 return dummy_time; | 271 return dummy_time; |
| 272 } | 272 } |
| 273 | 273 |
| 274 bool MockRenderProcessHost::IsProcessBackgrounded() const { | 274 bool MockRenderProcessHost::IsProcessBackgrounded() const { |
| 275 return is_process_backgrounded_; | 275 return is_process_backgrounded_; |
| 276 } | 276 } |
| 277 | 277 |
| 278 size_t MockRenderProcessHost::GetWorkerRefCount() const { |
| 279 return worker_ref_count_; |
| 280 } |
| 281 |
| 278 void MockRenderProcessHost::IncrementServiceWorkerRefCount() { | 282 void MockRenderProcessHost::IncrementServiceWorkerRefCount() { |
| 279 ++worker_ref_count_; | 283 ++worker_ref_count_; |
| 280 } | 284 } |
| 281 | 285 |
| 282 void MockRenderProcessHost::DecrementServiceWorkerRefCount() { | 286 void MockRenderProcessHost::DecrementServiceWorkerRefCount() { |
| 283 --worker_ref_count_; | 287 --worker_ref_count_; |
| 284 } | 288 } |
| 285 | 289 |
| 286 void MockRenderProcessHost::IncrementSharedWorkerRefCount() { | 290 void MockRenderProcessHost::IncrementSharedWorkerRefCount() { |
| 287 ++worker_ref_count_; | 291 ++worker_ref_count_; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 388 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
| 385 it != processes_.end(); ++it) { | 389 it != processes_.end(); ++it) { |
| 386 if (*it == host) { | 390 if (*it == host) { |
| 387 processes_.weak_erase(it); | 391 processes_.weak_erase(it); |
| 388 break; | 392 break; |
| 389 } | 393 } |
| 390 } | 394 } |
| 391 } | 395 } |
| 392 | 396 |
| 393 } // namespace content | 397 } // namespace content |
| OLD | NEW |