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 <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 return browser_context_; | 233 return browser_context_; |
234 } | 234 } |
235 | 235 |
236 bool MockRenderProcessHost::InSameStoragePartition( | 236 bool MockRenderProcessHost::InSameStoragePartition( |
237 StoragePartition* partition) const { | 237 StoragePartition* partition) const { |
238 // Mock RPHs only have one partition. | 238 // Mock RPHs only have one partition. |
239 return true; | 239 return true; |
240 } | 240 } |
241 | 241 |
242 IPC::ChannelProxy* MockRenderProcessHost::GetChannel() { | 242 IPC::ChannelProxy* MockRenderProcessHost::GetChannel() { |
243 return NULL; | 243 return nullptr; |
| 244 } |
| 245 |
| 246 IPC::Sender* MockRenderProcessHost::GetImmediateSender() { |
| 247 return this; |
| 248 } |
| 249 |
| 250 IPC::Sender* MockRenderProcessHost::GetIOThreadSender() { |
| 251 return this; |
244 } | 252 } |
245 | 253 |
246 void MockRenderProcessHost::AddFilter(BrowserMessageFilter* filter) { | 254 void MockRenderProcessHost::AddFilter(BrowserMessageFilter* filter) { |
247 } | 255 } |
248 | 256 |
249 bool MockRenderProcessHost::FastShutdownForPageCount(size_t count) { | 257 bool MockRenderProcessHost::FastShutdownForPageCount(size_t count) { |
250 if (GetActiveViewCount() == count) | 258 if (GetActiveViewCount() == count) |
251 return FastShutdownIfPossible(); | 259 return FastShutdownIfPossible(); |
252 return false; | 260 return false; |
253 } | 261 } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 377 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
370 it != processes_.end(); ++it) { | 378 it != processes_.end(); ++it) { |
371 if (*it == host) { | 379 if (*it == host) { |
372 processes_.weak_erase(it); | 380 processes_.weak_erase(it); |
373 break; | 381 break; |
374 } | 382 } |
375 } | 383 } |
376 } | 384 } |
377 | 385 |
378 } // namespace content | 386 } // namespace content |
OLD | NEW |