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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 entry_pair.first, static_cast<int>(details.status), details.exit_code)); | 94 entry_pair.first, static_cast<int>(details.status), details.exit_code)); |
95 } | 95 } |
96 } | 96 } |
97 | 97 |
98 bool MockRenderProcessHost::Init() { | 98 bool MockRenderProcessHost::Init() { |
99 has_connection_ = true; | 99 has_connection_ = true; |
100 remote_interfaces_.reset(new service_manager::InterfaceProvider); | 100 remote_interfaces_.reset(new service_manager::InterfaceProvider); |
101 return true; | 101 return true; |
102 } | 102 } |
103 | 103 |
| 104 void MockRenderProcessHost::EnableSendQueue() {} |
| 105 |
104 int MockRenderProcessHost::GetNextRoutingID() { | 106 int MockRenderProcessHost::GetNextRoutingID() { |
105 return ++prev_routing_id_; | 107 return ++prev_routing_id_; |
106 } | 108 } |
107 | 109 |
108 void MockRenderProcessHost::AddRoute(int32_t routing_id, | 110 void MockRenderProcessHost::AddRoute(int32_t routing_id, |
109 IPC::Listener* listener) { | 111 IPC::Listener* listener) { |
110 listeners_.AddWithID(listener, routing_id); | 112 listeners_.AddWithID(listener, routing_id); |
111 } | 113 } |
112 | 114 |
113 void MockRenderProcessHost::RemoveRoute(int32_t routing_id) { | 115 void MockRenderProcessHost::RemoveRoute(int32_t routing_id) { |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 381 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
380 it != processes_.end(); ++it) { | 382 it != processes_.end(); ++it) { |
381 if (*it == host) { | 383 if (*it == host) { |
382 processes_.weak_erase(it); | 384 processes_.weak_erase(it); |
383 break; | 385 break; |
384 } | 386 } |
385 } | 387 } |
386 } | 388 } |
387 | 389 |
388 } // namespace content | 390 } // namespace content |
OLD | NEW |