OLD | NEW |
1 // Copyright (c) 2009 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), |
11 transport_dib_(NULL), | 11 transport_dib_(NULL), |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void MockRenderProcessHost::WidgetRestored() { | 53 void MockRenderProcessHost::WidgetRestored() { |
54 } | 54 } |
55 | 55 |
56 void MockRenderProcessHost::WidgetHidden() { | 56 void MockRenderProcessHost::WidgetHidden() { |
57 } | 57 } |
58 | 58 |
59 int MockRenderProcessHost::VisibleWidgetCount() const { | 59 int MockRenderProcessHost::VisibleWidgetCount() const { |
60 return 1; | 60 return 1; |
61 } | 61 } |
62 | 62 |
| 63 void MockRenderProcessHost::AddPendingView() { |
| 64 } |
| 65 |
| 66 void MockRenderProcessHost::RemovePendingView() { |
| 67 } |
| 68 |
63 void MockRenderProcessHost::AddWord(const string16& word) { | 69 void MockRenderProcessHost::AddWord(const string16& word) { |
64 } | 70 } |
65 | 71 |
66 | 72 |
67 bool MockRenderProcessHost::FastShutdownIfPossible() { | 73 bool MockRenderProcessHost::FastShutdownIfPossible() { |
68 // We aren't actually going to do anything, but set |fast_shutdown_started_| | 74 // We aren't actually going to do anything, but set |fast_shutdown_started_| |
69 // to true so that tests know we've been called. | 75 // to true so that tests know we've been called. |
70 fast_shutdown_started_ = true; | 76 fast_shutdown_started_ = true; |
71 return true; | 77 return true; |
72 } | 78 } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 144 |
139 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { | 145 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { |
140 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 146 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
141 it != processes_.end(); ++it) { | 147 it != processes_.end(); ++it) { |
142 if (*it == host) { | 148 if (*it == host) { |
143 processes_.weak_erase(it); | 149 processes_.weak_erase(it); |
144 break; | 150 break; |
145 } | 151 } |
146 } | 152 } |
147 } | 153 } |
OLD | NEW |