Index: content/test/layouttest_support.cc |
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc |
index 731f9918672f08bd8b40fbd6026c1a453c974e14..77d3aa6952b49794746513c4244a69eca67af90f 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,19 @@ 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) { |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
+ |
+ RenderProcessHostImpl* render_process_host_impl = |
+ static_cast<RenderProcessHostImpl*>( |
+ RenderProcessHost::FromID(render_process_id)); |
+ DCHECK(render_process_host_impl); |
+ |
+ BluetoothDispatcherHost* bdh = |
+ render_process_host_impl->GetBluetoothDispatcherHost(); |
+ DCHECK(bdh); |
jam
2015/05/18 15:37:57
nit: remove all dchecks from this method.
the fir
ortuno
2015/05/18 17:40:17
Done.
|
+ |
+ bdh->SetBluetoothAdapterForTesting(name); |
} |
void SetGeofencingMockProvider(bool service_available) { |