Chromium Code Reviews| Index: content/test/layouttest_support.cc |
| diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc |
| index 731f9918672f08bd8b40fbd6026c1a453c974e14..deb26ce9f755828348246c63ced53688e05536e1 100644 |
| --- a/content/test/layouttest_support.cc |
| +++ b/content/test/layouttest_support.cc |
| @@ -7,8 +7,9 @@ |
| #include "base/callback.h" |
| #include "base/lazy_instance.h" |
| #include "cc/blink/web_layer_impl.h" |
| +#include "content/browser/bluetooth/bluetooth_dispatcher_host.h" |
| +#include "content/browser/renderer_host/render_process_host_impl.h" |
| #include "content/browser/renderer_host/render_widget_host_impl.h" |
| -#include "content/child/bluetooth/web_bluetooth_impl.h" |
| #include "content/child/geofencing/web_geofencing_provider_impl.h" |
| #include "content/common/gpu/image_transport_surface.h" |
| #include "content/public/common/page_state.h" |
| @@ -312,11 +313,16 @@ void SetDeviceColorProfile(RenderView* render_view, const std::string& name) { |
| SetDeviceColorProfileForTesting(color_profile); |
| } |
| -void SetBluetoothMockDataSetForTesting(const std::string& name) { |
| - RenderThreadImpl::current() |
| - ->blink_platform_impl() |
| - ->BluetoothImplForTesting() |
| - ->SetBluetoothMockDataSetForTesting(name); |
| +void SetBluetoothAdapter(int render_process_id, const std::string& name) { |
| + RenderProcessHostImpl* render_process_host_impl = |
| + static_cast<RenderProcessHostImpl*>( |
| + RenderProcessHost::FromID(render_process_id)); |
| + |
| + BluetoothDispatcherHost* dispatcher_host = render_process_host_impl |
| + ->GetBluetoothDispatcherHost(); |
| + |
| + if (dispatcher_host != NULL) |
|
scheib
2015/05/20 04:21:27
Just "if (dispatcher_host)" in C++
|
| + dispatcher_host->SetBluetoothAdapterForTesting(name); |
| } |
| void SetGeofencingMockProvider(bool service_available) { |