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

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

Issue 2735773002: work in progress
Patch Set: Created 3 years, 9 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
« no previous file with comments | « content/browser/bluetooth/web_bluetooth_service_impl.h ('k') | content/public/browser/bluetooth_chooser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 be6853b1fd7cd9adee5a7648d7a385c54499a973..e04279afd99cfd2d8c108546a8dae67fc238b9f1 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.cc
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc
@@ -212,6 +212,15 @@ void WebBluetoothServiceImpl::AdapterPoweredChanged(
}
}
+void WebBluetoothServiceImpl::AdapterDiscoveringChanged(
+ device::BluetoothAdapter* adapter,
+ bool discovering) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ if (device_chooser_controller_.get()) {
+ device_chooser_controller_->AdapterDiscoveringChanged(discovering);
+ }
+}
+
void WebBluetoothServiceImpl::DeviceAdded(device::BluetoothAdapter* adapter,
device::BluetoothDevice* device) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -1193,4 +1202,17 @@ void WebBluetoothServiceImpl::ClearState() {
BluetoothAdapterFactoryWrapper::Get().ReleaseAdapter(this);
}
+void WebBluetoothServiceImpl::ChangeAdapterDiscoveringForTesting(
+ device::BluetoothAdapter* adapter,
+ bool discovering) {
+ AdapterDiscoveringChanged(adapter, discovering);
+}
+
+bool WebBluetoothServiceImpl::IsDiscoverySessionActiveForTesting() {
+ if (device_chooser_controller_.get())
+ return device_chooser_controller_->IsDiscoverySessionActive();
+
+ return false;
+}
+
} // namespace content
« no previous file with comments | « content/browser/bluetooth/web_bluetooth_service_impl.h ('k') | content/public/browser/bluetooth_chooser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698