| 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( | 9 MockRenderProcessHost::MockRenderProcessHost( |
| 10 content::BrowserContext* browser_context) | 10 content::BrowserContext* browser_context) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 bool MockRenderProcessHost::Init(bool is_accessibility_enabled) { | 30 bool MockRenderProcessHost::Init(bool is_accessibility_enabled) { |
| 31 return true; | 31 return true; |
| 32 } | 32 } |
| 33 | 33 |
| 34 int MockRenderProcessHost::GetNextRoutingID() { | 34 int MockRenderProcessHost::GetNextRoutingID() { |
| 35 static int prev_routing_id = 0; | 35 static int prev_routing_id = 0; |
| 36 return ++prev_routing_id; | 36 return ++prev_routing_id; |
| 37 } | 37 } |
| 38 | 38 |
| 39 void MockRenderProcessHost::UpdateAndSendMaxPageID(int32 page_id) { |
| 40 UpdateMaxPageID(page_id); |
| 41 } |
| 42 |
| 39 void MockRenderProcessHost::CancelResourceRequests(int render_widget_id) { | 43 void MockRenderProcessHost::CancelResourceRequests(int render_widget_id) { |
| 40 } | 44 } |
| 41 | 45 |
| 42 void MockRenderProcessHost::CrossSiteSwapOutACK( | 46 void MockRenderProcessHost::CrossSiteSwapOutACK( |
| 43 const ViewMsg_SwapOut_Params& params) { | 47 const ViewMsg_SwapOut_Params& params) { |
| 44 } | 48 } |
| 45 | 49 |
| 46 bool MockRenderProcessHost::WaitForUpdateMsg(int render_widget_id, | 50 bool MockRenderProcessHost::WaitForUpdateMsg(int render_widget_id, |
| 47 const base::TimeDelta& max_delay, | 51 const base::TimeDelta& max_delay, |
| 48 IPC::Message* msg) { | 52 IPC::Message* msg) { |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 146 |
| 143 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { | 147 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { |
| 144 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 148 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
| 145 it != processes_.end(); ++it) { | 149 it != processes_.end(); ++it) { |
| 146 if (*it == host) { | 150 if (*it == host) { |
| 147 processes_.weak_erase(it); | 151 processes_.weak_erase(it); |
| 148 break; | 152 break; |
| 149 } | 153 } |
| 150 } | 154 } |
| 151 } | 155 } |
| OLD | NEW |