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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 } | 76 } |
77 | 77 |
78 int MockRenderProcessHost::VisibleWidgetCount() const { | 78 int MockRenderProcessHost::VisibleWidgetCount() const { |
79 return 1; | 79 return 1; |
80 } | 80 } |
81 | 81 |
82 bool MockRenderProcessHost::IsGuest() const { | 82 bool MockRenderProcessHost::IsGuest() const { |
83 return false; | 83 return false; |
84 } | 84 } |
85 | 85 |
| 86 StoragePartition* MockRenderProcessHost::GetStoragePartition() const { |
| 87 return NULL; |
| 88 } |
| 89 |
86 void MockRenderProcessHost::AddWord(const string16& word) { | 90 void MockRenderProcessHost::AddWord(const string16& word) { |
87 } | 91 } |
88 | 92 |
89 bool MockRenderProcessHost::FastShutdownIfPossible() { | 93 bool MockRenderProcessHost::FastShutdownIfPossible() { |
90 // We aren't actually going to do anything, but set |fast_shutdown_started_| | 94 // We aren't actually going to do anything, but set |fast_shutdown_started_| |
91 // to true so that tests know we've been called. | 95 // to true so that tests know we've been called. |
92 fast_shutdown_started_ = true; | 96 fast_shutdown_started_ = true; |
93 return true; | 97 return true; |
94 } | 98 } |
95 | 99 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 260 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
257 it != processes_.end(); ++it) { | 261 it != processes_.end(); ++it) { |
258 if (*it == host) { | 262 if (*it == host) { |
259 processes_.weak_erase(it); | 263 processes_.weak_erase(it); |
260 break; | 264 break; |
261 } | 265 } |
262 } | 266 } |
263 } | 267 } |
264 | 268 |
265 } // content | 269 } // content |
OLD | NEW |