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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 return base::TimeDelta::FromMilliseconds(0); | 263 return base::TimeDelta::FromMilliseconds(0); |
264 } | 264 } |
265 | 265 |
266 void MockRenderProcessHost::BindInterface( | 266 void MockRenderProcessHost::BindInterface( |
267 const std::string& interface_name, | 267 const std::string& interface_name, |
268 mojo::ScopedMessagePipeHandle interface_pipe) { | 268 mojo::ScopedMessagePipeHandle interface_pipe) { |
269 if (binder_overrides_.count(interface_name) > 0) | 269 if (binder_overrides_.count(interface_name) > 0) |
270 binder_overrides_[interface_name].Run(std::move(interface_pipe)); | 270 binder_overrides_[interface_name].Run(std::move(interface_pipe)); |
271 } | 271 } |
272 | 272 |
| 273 const service_manager::Identity& MockRenderProcessHost::GetChildIdentity() |
| 274 const { |
| 275 return child_identity_; |
| 276 } |
| 277 |
273 std::unique_ptr<base::SharedPersistentMemoryAllocator> | 278 std::unique_ptr<base::SharedPersistentMemoryAllocator> |
274 MockRenderProcessHost::TakeMetricsAllocator() { | 279 MockRenderProcessHost::TakeMetricsAllocator() { |
275 return nullptr; | 280 return nullptr; |
276 } | 281 } |
277 | 282 |
278 const base::TimeTicks& MockRenderProcessHost::GetInitTimeForNavigationMetrics() | 283 const base::TimeTicks& MockRenderProcessHost::GetInitTimeForNavigationMetrics() |
279 const { | 284 const { |
280 static base::TimeTicks dummy_time = base::TimeTicks::Now(); | 285 static base::TimeTicks dummy_time = base::TimeTicks::Now(); |
281 return dummy_time; | 286 return dummy_time; |
282 } | 287 } |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 for (auto it = processes_.begin(); it != processes_.end(); ++it) { | 415 for (auto it = processes_.begin(); it != processes_.end(); ++it) { |
411 if (it->get() == host) { | 416 if (it->get() == host) { |
412 it->release(); | 417 it->release(); |
413 processes_.erase(it); | 418 processes_.erase(it); |
414 break; | 419 break; |
415 } | 420 } |
416 } | 421 } |
417 } | 422 } |
418 | 423 |
419 } // namespace content | 424 } // namespace content |
OLD | NEW |