| 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..35becbf0630361bb1392d759fd1eaba6dca89104 100644
|
| --- a/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h
|
| +++ b/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h
|
| @@ -28,14 +28,25 @@ class BluetoothChooserController : public ChooserController {
|
| ~BluetoothChooserController() override;
|
|
|
| // ChooserController:
|
| + base::string16 GetNoOptionsText() const override;
|
| base::string16 GetOkButtonLabel() const override;
|
| size_t NumOptions() const override;
|
| base::string16 GetOption(size_t index) const override;
|
| + void RefreshOptions() override;
|
| + base::string16 GetStatus() 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 OnAdapterPresenceChanged(
|
| + content::BluetoothChooser::AdapterPresence presence);
|
| +
|
| + // Update the Bluetooth discovery state and let the user know whether
|
| + // discovery is happening.
|
| + void OnDiscoveryStateChanged(content::BluetoothChooser::DiscoveryState state);
|
| +
|
| // Shows a new device in the chooser.
|
| void AddDevice(const std::string& device_id,
|
| const base::string16& device_name);
|
| @@ -44,11 +55,17 @@ 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_;
|
| // Maps from device name to number of devices.
|
| std::unordered_map<base::string16, int> device_name_map_;
|
| + base::string16 no_devices_text_;
|
| + base::string16 status_text_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(BluetoothChooserController);
|
| };
|
|
|