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

Unified Diff: content/browser/bluetooth/bluetooth_device_chooser_controller.h

Issue 2762023002: work in progress 2
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 | « apps/BUILD.gn ('k') | content/browser/bluetooth/bluetooth_device_chooser_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/bluetooth/bluetooth_device_chooser_controller.h
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.h b/content/browser/bluetooth/bluetooth_device_chooser_controller.h
index a054d6bf7058b521c3ecfde6c72256fd88122698..1dad2c97d6c4f330e0d9246ef624af36d7bc74a8 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.h
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.h
@@ -79,6 +79,10 @@ class CONTENT_EXPORT BluetoothDeviceChooserController final {
// that the adapter changed states.
void AdapterPoweredChanged(bool powered);
+ // Stops the discovery session and notifies the chooser
+ // when discovery stops accidentally.
+ void AdapterDiscoveringChanged(bool discovering);
+
// Received Signal Strength Indicator (RSSI) is a measurement of the power
// present in a received radio signal.
static int CalculateSignalStrengthLevel(int8_t rssi);
@@ -87,6 +91,10 @@ class CONTENT_EXPORT BluetoothDeviceChooserController final {
// BluetoothDeviceChooserController will have a scan duration of 0.
static void SetTestScanDurationForTesting();
+ bool IsDiscoverySessionActive();
+
+ void StartDeviceDiscoveryForTesting();
+
private:
// Populates the chooser with the GATT connected devices.
void PopulateConnectedDevices();
@@ -142,9 +150,6 @@ class CONTENT_EXPORT BluetoothDeviceChooserController final {
base::Timer discovery_session_timer_;
// The last discovery session to be started.
- // TODO(ortuno): This should be null unless there is an active discovery
- // session. We need to null it when the platform stops discovery.
- // http://crbug.com/611852
std::unique_ptr<device::BluetoothDiscoverySession> discovery_session_;
// The time when scanning starts.
« no previous file with comments | « apps/BUILD.gn ('k') | content/browser/bluetooth/bluetooth_device_chooser_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698