| 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/test/mock_render_process_host.h" | 5 #include "content/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 24 matching lines...) Expand all Loading... |
| 35 delete transport_dib_; | 35 delete transport_dib_; |
| 36 if (factory_) | 36 if (factory_) |
| 37 factory_->Remove(this); | 37 factory_->Remove(this); |
| 38 // In unit tests, Release() might not have been called. | 38 // In unit tests, Release() might not have been called. |
| 39 RenderProcessHostImpl::UnregisterHost(GetID()); | 39 RenderProcessHostImpl::UnregisterHost(GetID()); |
| 40 } | 40 } |
| 41 | 41 |
| 42 void MockRenderProcessHost::EnableSendQueue() { | 42 void MockRenderProcessHost::EnableSendQueue() { |
| 43 } | 43 } |
| 44 | 44 |
| 45 bool MockRenderProcessHost::Init(bool is_accessibility_enabled) { | 45 bool MockRenderProcessHost::Init() { |
| 46 return true; | 46 return true; |
| 47 } | 47 } |
| 48 | 48 |
| 49 int MockRenderProcessHost::GetNextRoutingID() { | 49 int MockRenderProcessHost::GetNextRoutingID() { |
| 50 static int prev_routing_id = 0; | 50 static int prev_routing_id = 0; |
| 51 return ++prev_routing_id; | 51 return ++prev_routing_id; |
| 52 } | 52 } |
| 53 | 53 |
| 54 void MockRenderProcessHost::CancelResourceRequests(int render_widget_id) { | 54 void MockRenderProcessHost::CancelResourceRequests(int render_widget_id) { |
| 55 } | 55 } |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 240 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
| 241 it != processes_.end(); ++it) { | 241 it != processes_.end(); ++it) { |
| 242 if (*it == host) { | 242 if (*it == host) { |
| 243 processes_.weak_erase(it); | 243 processes_.weak_erase(it); |
| 244 break; | 244 break; |
| 245 } | 245 } |
| 246 } | 246 } |
| 247 } | 247 } |
| 248 | 248 |
| 249 } // content | 249 } // content |
| OLD | NEW |