Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: content/browser/bluetooth/web_bluetooth_service_impl.cc

Issue 2050803002: Better way to implement FrameConnectedBluetoothDevicesTest Base URL: https://chromium.googlesource.com/chromium/src.git@patch_ortuno
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/bluetooth/web_bluetooth_service_impl.cc
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.cc b/content/browser/bluetooth/web_bluetooth_service_impl.cc
index 05f1ebad273044b90192b6a67022ee333025ba56..72b1d968f8fabb7636c243eec81f71c6554083fa 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.cc
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc
@@ -170,13 +170,14 @@ WebBluetoothServiceImpl::WebBluetoothServiceImpl(
weak_ptr_factory_(this) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
CHECK(web_contents());
-
- GetBluetoothDispatcherHost()->AddAdapterObserver(this);
+ // TODO(nick): Commented out due to bad cast.
+ // GetBluetoothDispatcherHost()->AddAdapterObserver(this);
}
WebBluetoothServiceImpl::~WebBluetoothServiceImpl() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- GetBluetoothDispatcherHost()->RemoveAdapterObserver(this);
+ // TODO(nick): Commented out due to bad cast.
+ // GetBluetoothDispatcherHost()->RemoveAdapterObserver(this);
}
void WebBluetoothServiceImpl::SetClientConnectionErrorHandler(
@@ -811,6 +812,8 @@ RenderProcessHost* WebBluetoothServiceImpl::GetRenderProcessHost() {
}
BluetoothDispatcherHost* WebBluetoothServiceImpl::GetBluetoothDispatcherHost() {
+ // TODO(nick): This cast is illegal. Either call a RenderProcessHost method
+ // here, or obtain this link some other way.
RenderProcessHostImpl* render_process_host_impl =
static_cast<RenderProcessHostImpl*>(GetRenderProcessHost());
return render_process_host_impl->GetBluetoothDispatcherHost();
« no previous file with comments | « content/browser/bluetooth/web_bluetooth_service_impl.h ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698