OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/renderer_host/mock_render_process_host.h" | 5 #include "content/browser/renderer_host/mock_render_process_host.h" |
6 | 6 |
7 #include "content/browser/child_process_security_policy.h" | 7 #include "content/browser/child_process_security_policy.h" |
8 | 8 |
9 MockRenderProcessHost::MockRenderProcessHost(Profile* profile) | 9 MockRenderProcessHost::MockRenderProcessHost(Profile* profile) |
10 : RenderProcessHost(profile), | 10 : RenderProcessHost(profile), |
(...skipping 17 matching lines...) Expand all Loading... |
28 } | 28 } |
29 | 29 |
30 int MockRenderProcessHost::GetNextRoutingID() { | 30 int MockRenderProcessHost::GetNextRoutingID() { |
31 static int prev_routing_id = 0; | 31 static int prev_routing_id = 0; |
32 return ++prev_routing_id; | 32 return ++prev_routing_id; |
33 } | 33 } |
34 | 34 |
35 void MockRenderProcessHost::CancelResourceRequests(int render_widget_id) { | 35 void MockRenderProcessHost::CancelResourceRequests(int render_widget_id) { |
36 } | 36 } |
37 | 37 |
38 void MockRenderProcessHost::CrossSiteClosePageACK( | 38 void MockRenderProcessHost::CrossSiteSwapOutACK( |
39 const ViewMsg_ClosePage_Params& params) { | 39 const ViewMsg_SwapOut_Params& params) { |
40 } | 40 } |
41 | 41 |
42 bool MockRenderProcessHost::WaitForUpdateMsg(int render_widget_id, | 42 bool MockRenderProcessHost::WaitForUpdateMsg(int render_widget_id, |
43 const base::TimeDelta& max_delay, | 43 const base::TimeDelta& max_delay, |
44 IPC::Message* msg) { | 44 IPC::Message* msg) { |
45 return false; | 45 return false; |
46 } | 46 } |
47 | 47 |
48 void MockRenderProcessHost::ReceivedBadMessage() { | 48 void MockRenderProcessHost::ReceivedBadMessage() { |
49 ++bad_msg_count_; | 49 ++bad_msg_count_; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { | 138 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { |
139 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 139 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
140 it != processes_.end(); ++it) { | 140 it != processes_.end(); ++it) { |
141 if (*it == host) { | 141 if (*it == host) { |
142 processes_.weak_erase(it); | 142 processes_.weak_erase(it); |
143 break; | 143 break; |
144 } | 144 } |
145 } | 145 } |
146 } | 146 } |
OLD | NEW |