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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 entry_pair.second->OnMessageReceived(FrameHostMsg_RenderProcessGone( | 97 entry_pair.second->OnMessageReceived(FrameHostMsg_RenderProcessGone( |
98 entry_pair.first, static_cast<int>(details.status), details.exit_code)); | 98 entry_pair.first, static_cast<int>(details.status), details.exit_code)); |
99 } | 99 } |
100 } | 100 } |
101 | 101 |
102 void MockRenderProcessHost::EnableSendQueue() { | 102 void MockRenderProcessHost::EnableSendQueue() { |
103 } | 103 } |
104 | 104 |
105 bool MockRenderProcessHost::Init() { | 105 bool MockRenderProcessHost::Init() { |
106 has_connection_ = true; | 106 has_connection_ = true; |
107 remote_interfaces_.reset(new shell::InterfaceProvider); | |
sky
2016/07/22 16:47:48
This seems reasonable, but we this class also defi
leonhsl(Using Gerrit)
2016/07/23 00:41:45
Good catch~~ I think we can remove SetRemoteInterf
leonhsl(Using Gerrit)
2016/07/25 06:58:18
Sorry I had some misunderstanding about MockRender
| |
107 return true; | 108 return true; |
108 } | 109 } |
109 | 110 |
110 int MockRenderProcessHost::GetNextRoutingID() { | 111 int MockRenderProcessHost::GetNextRoutingID() { |
111 return ++prev_routing_id_; | 112 return ++prev_routing_id_; |
112 } | 113 } |
113 | 114 |
114 void MockRenderProcessHost::AddRoute(int32_t routing_id, | 115 void MockRenderProcessHost::AddRoute(int32_t routing_id, |
115 IPC::Listener* listener) { | 116 IPC::Listener* listener) { |
116 listeners_.AddWithID(listener, routing_id); | 117 listeners_.AddWithID(listener, routing_id); |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
375 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 376 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
376 it != processes_.end(); ++it) { | 377 it != processes_.end(); ++it) { |
377 if (*it == host) { | 378 if (*it == host) { |
378 processes_.weak_erase(it); | 379 processes_.weak_erase(it); |
379 break; | 380 break; |
380 } | 381 } |
381 } | 382 } |
382 } | 383 } |
383 | 384 |
384 } // namespace content | 385 } // namespace content |
OLD | NEW |