Chromium Code Reviews| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 void MockRenderProcessHost::WidgetRestored() { | 131 void MockRenderProcessHost::WidgetRestored() { |
| 132 } | 132 } |
| 133 | 133 |
| 134 void MockRenderProcessHost::WidgetHidden() { | 134 void MockRenderProcessHost::WidgetHidden() { |
| 135 } | 135 } |
| 136 | 136 |
| 137 int MockRenderProcessHost::VisibleWidgetCount() const { | 137 int MockRenderProcessHost::VisibleWidgetCount() const { |
| 138 return 1; | 138 return 1; |
| 139 } | 139 } |
| 140 | 140 |
| 141 void MockRenderProcessHost::AudioStateChanged() {} | |
| 142 | |
| 141 bool MockRenderProcessHost::IsForGuestsOnly() const { | 143 bool MockRenderProcessHost::IsForGuestsOnly() const { |
| 142 return is_for_guests_only_; | 144 return is_for_guests_only_; |
| 143 } | 145 } |
| 144 | 146 |
| 145 StoragePartition* MockRenderProcessHost::GetStoragePartition() const { | 147 StoragePartition* MockRenderProcessHost::GetStoragePartition() const { |
| 146 return BrowserContext::GetDefaultStoragePartition(browser_context_); | 148 return BrowserContext::GetDefaultStoragePartition(browser_context_); |
| 147 } | 149 } |
| 148 | 150 |
| 149 void MockRenderProcessHost::AddWord(const base::string16& word) { | 151 void MockRenderProcessHost::AddWord(const base::string16& word) { |
| 150 } | 152 } |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 275 unsigned int target, const gpu::ValueState& state) { | 277 unsigned int target, const gpu::ValueState& state) { |
| 276 } | 278 } |
| 277 | 279 |
| 278 #if defined(ENABLE_BROWSER_CDMS) | 280 #if defined(ENABLE_BROWSER_CDMS) |
| 279 media::BrowserCdm* MockRenderProcessHost::GetBrowserCdm(int render_frame_id, | 281 media::BrowserCdm* MockRenderProcessHost::GetBrowserCdm(int render_frame_id, |
| 280 int cdm_id) const { | 282 int cdm_id) const { |
| 281 return nullptr; | 283 return nullptr; |
| 282 } | 284 } |
| 283 #endif | 285 #endif |
| 284 | 286 |
| 287 #if defined(OS_MACOSX) | |
| 288 mach_port_t MockRenderProcessHost::GetMachTaskPortForTesting() const { | |
| 289 mach_port_t port = 0; | |
| 290 return port; | |
|
Robert Sesek
2015/08/24 21:44:48
return MACH_PORT_NULL;
sebsg
2015/08/25 01:35:59
Done.
| |
| 291 } | |
| 292 #endif | |
| 293 | |
| 285 void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) { | 294 void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) { |
| 286 RenderProcessHostImpl::FilterURL(this, empty_allowed, url); | 295 RenderProcessHostImpl::FilterURL(this, empty_allowed, url); |
| 287 } | 296 } |
| 288 | 297 |
| 289 #if defined(ENABLE_WEBRTC) | 298 #if defined(ENABLE_WEBRTC) |
| 290 void MockRenderProcessHost::EnableAecDump(const base::FilePath& file) { | 299 void MockRenderProcessHost::EnableAecDump(const base::FilePath& file) { |
| 291 } | 300 } |
| 292 | 301 |
| 293 void MockRenderProcessHost::DisableAecDump() { | 302 void MockRenderProcessHost::DisableAecDump() { |
| 294 } | 303 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 345 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 354 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
| 346 it != processes_.end(); ++it) { | 355 it != processes_.end(); ++it) { |
| 347 if (*it == host) { | 356 if (*it == host) { |
| 348 processes_.weak_erase(it); | 357 processes_.weak_erase(it); |
| 349 break; | 358 break; |
| 350 } | 359 } |
| 351 } | 360 } |
| 352 } | 361 } |
| 353 | 362 |
| 354 } // content | 363 } // content |
| OLD | NEW |