| 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/layouttest_support.h" | 5 #include "content/public/test/layouttest_support.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "components/test_runner/test_common.h" | 10 #include "components/test_runner/test_common.h" |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 void SetBluetoothAdapter(int render_process_id, | 355 void SetBluetoothAdapter(int render_process_id, |
| 356 scoped_refptr<device::BluetoothAdapter> adapter) { | 356 scoped_refptr<device::BluetoothAdapter> adapter) { |
| 357 RenderProcessHostImpl* render_process_host_impl = | 357 RenderProcessHostImpl* render_process_host_impl = |
| 358 static_cast<RenderProcessHostImpl*>( | 358 static_cast<RenderProcessHostImpl*>( |
| 359 RenderProcessHost::FromID(render_process_id)); | 359 RenderProcessHost::FromID(render_process_id)); |
| 360 | 360 |
| 361 BluetoothDispatcherHost* dispatcher_host = | 361 BluetoothDispatcherHost* dispatcher_host = |
| 362 render_process_host_impl->GetBluetoothDispatcherHost(); | 362 render_process_host_impl->GetBluetoothDispatcherHost(); |
| 363 | 363 |
| 364 if (dispatcher_host != NULL) | 364 if (dispatcher_host != NULL) |
| 365 dispatcher_host->SetBluetoothAdapterForTesting(adapter.Pass()); | 365 dispatcher_host->SetBluetoothAdapterForTesting(std::move(adapter)); |
| 366 } | 366 } |
| 367 | 367 |
| 368 void SetGeofencingMockProvider(bool service_available) { | 368 void SetGeofencingMockProvider(bool service_available) { |
| 369 static_cast<WebGeofencingProviderImpl*>( | 369 static_cast<WebGeofencingProviderImpl*>( |
| 370 RenderThreadImpl::current()->blink_platform_impl()->geofencingProvider()) | 370 RenderThreadImpl::current()->blink_platform_impl()->geofencingProvider()) |
| 371 ->SetMockProvider(service_available); | 371 ->SetMockProvider(service_available); |
| 372 } | 372 } |
| 373 | 373 |
| 374 void ClearGeofencingMockProvider() { | 374 void ClearGeofencingMockProvider() { |
| 375 static_cast<WebGeofencingProviderImpl*>( | 375 static_cast<WebGeofencingProviderImpl*>( |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 result.append( | 451 result.append( |
| 452 DumpHistoryItem(entry->root_history_node(), | 452 DumpHistoryItem(entry->root_history_node(), |
| 453 8, | 453 8, |
| 454 index == current_index)); | 454 index == current_index)); |
| 455 } | 455 } |
| 456 result.append("===============================================\n"); | 456 result.append("===============================================\n"); |
| 457 return result; | 457 return result; |
| 458 } | 458 } |
| 459 | 459 |
| 460 } // namespace content | 460 } // namespace content |
| OLD | NEW |