| 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 "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "content/browser/child_process_security_policy_impl.h" | 10 #include "content/browser/child_process_security_policy_impl.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 bool MockRenderProcessHost::Init() { | 47 bool MockRenderProcessHost::Init() { |
| 48 return true; | 48 return true; |
| 49 } | 49 } |
| 50 | 50 |
| 51 int MockRenderProcessHost::GetNextRoutingID() { | 51 int MockRenderProcessHost::GetNextRoutingID() { |
| 52 static int prev_routing_id = 0; | 52 static int prev_routing_id = 0; |
| 53 return ++prev_routing_id; | 53 return ++prev_routing_id; |
| 54 } | 54 } |
| 55 | 55 |
| 56 void MockRenderProcessHost::SimulateSwapOutACK( | |
| 57 const ViewMsg_SwapOut_Params& params) { | |
| 58 } | |
| 59 | |
| 60 bool MockRenderProcessHost::WaitForBackingStoreMsg( | 56 bool MockRenderProcessHost::WaitForBackingStoreMsg( |
| 61 int render_widget_id, | 57 int render_widget_id, |
| 62 const base::TimeDelta& max_delay, | 58 const base::TimeDelta& max_delay, |
| 63 IPC::Message* msg) { | 59 IPC::Message* msg) { |
| 64 return false; | 60 return false; |
| 65 } | 61 } |
| 66 | 62 |
| 67 void MockRenderProcessHost::ReceivedBadMessage() { | 63 void MockRenderProcessHost::ReceivedBadMessage() { |
| 68 ++bad_msg_count_; | 64 ++bad_msg_count_; |
| 69 } | 65 } |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 263 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
| 268 it != processes_.end(); ++it) { | 264 it != processes_.end(); ++it) { |
| 269 if (*it == host) { | 265 if (*it == host) { |
| 270 processes_.weak_erase(it); | 266 processes_.weak_erase(it); |
| 271 break; | 267 break; |
| 272 } | 268 } |
| 273 } | 269 } |
| 274 } | 270 } |
| 275 | 271 |
| 276 } // content | 272 } // content |
| OLD | NEW |