| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 iter.Advance(); | 88 iter.Advance(); |
| 89 } | 89 } |
| 90 std::sort(sorted_listeners_.rbegin(), sorted_listeners_.rend()); | 90 std::sort(sorted_listeners_.rbegin(), sorted_listeners_.rend()); |
| 91 | 91 |
| 92 for (auto& entry_pair : sorted_listeners_) { | 92 for (auto& entry_pair : sorted_listeners_) { |
| 93 entry_pair.second->OnMessageReceived(FrameHostMsg_RenderProcessGone( | 93 entry_pair.second->OnMessageReceived(FrameHostMsg_RenderProcessGone( |
| 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 void MockRenderProcessHost::EnableSendQueue() { | |
| 99 } | |
| 100 | |
| 101 bool MockRenderProcessHost::Init() { | 98 bool MockRenderProcessHost::Init() { |
| 102 has_connection_ = true; | 99 has_connection_ = true; |
| 103 remote_interfaces_.reset(new shell::InterfaceProvider); | 100 remote_interfaces_.reset(new shell::InterfaceProvider); |
| 104 return true; | 101 return true; |
| 105 } | 102 } |
| 106 | 103 |
| 107 int MockRenderProcessHost::GetNextRoutingID() { | 104 int MockRenderProcessHost::GetNextRoutingID() { |
| 108 return ++prev_routing_id_; | 105 return ++prev_routing_id_; |
| 109 } | 106 } |
| 110 | 107 |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 371 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
| 375 it != processes_.end(); ++it) { | 372 it != processes_.end(); ++it) { |
| 376 if (*it == host) { | 373 if (*it == host) { |
| 377 processes_.weak_erase(it); | 374 processes_.weak_erase(it); |
| 378 break; | 375 break; |
| 379 } | 376 } |
| 380 } | 377 } |
| 381 } | 378 } |
| 382 | 379 |
| 383 } // namespace content | 380 } // namespace content |
| OLD | NEW |