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