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

Unified Diff: chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h

Issue 2155743002: Add throbber and status text to WebBluetooth chooser UI on non-Mac desktops (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed some unnecessary include files and forward declarations Created 4 years, 5 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: chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h
diff --git a/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h b/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h
index deb2caa0d51ff883dca2280a269a90596a17cc2c..9e79f2a960f11e52573e8192727f672e96a27563 100644
--- a/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h
+++ b/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h
@@ -31,11 +31,22 @@ class BluetoothChooserController : public ChooserController {
base::string16 GetOkButtonLabel() const override;
size_t NumOptions() const override;
base::string16 GetOption(size_t index) const override;
+ void RefreshOptions() override;
+ bool NeedsThrobber() const override;
+ bool NeedsStatus() const override;
void Select(size_t index) override;
void Cancel() override;
void Close() override;
void OpenHelpCenterUrl() const override;
+ // Update the state of the Bluetooth adapter.
+ void UpdateAdapterPresence(
+ content::BluetoothChooser::AdapterPresence presence);
+
+ // Update the Bluetooth discovery state and let the user know whether
+ // discovery is happening.
+ void UpdateDiscoveryState(content::BluetoothChooser::DiscoveryState state);
+
// Shows a new device in the chooser.
void AddDevice(const std::string& device_id,
const base::string16& device_name);
@@ -44,6 +55,10 @@ class BluetoothChooserController : public ChooserController {
void RemoveDevice(const std::string& device_id);
private:
+ // Clears |device_names_and_ids_| and |device_name_map_|. Called when
+ // Bluetooth adapter is turned on or off, or when re-scan happens.
+ void ClearAllDevices();
+
// Each pair is a (device name, device id).
std::vector<std::pair<base::string16, std::string>> device_names_and_ids_;
content::BluetoothChooser::EventHandler event_handler_;

Powered by Google App Engine
This is Rietveld 408576698