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

Side by Side Diff: chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h

Issue 2344133003: Add help link when Bluetooth adapter is off for WebBluetooth chooser (Closed)
Patch Set: address more comments Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTROLLER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 19 matching lines...) Expand all
30 // ChooserController: 30 // ChooserController:
31 bool ShouldShowIconBeforeText() const override; 31 bool ShouldShowIconBeforeText() const override;
32 base::string16 GetNoOptionsText() const override; 32 base::string16 GetNoOptionsText() const override;
33 base::string16 GetOkButtonLabel() const override; 33 base::string16 GetOkButtonLabel() const override;
34 size_t NumOptions() const override; 34 size_t NumOptions() const override;
35 int GetSignalStrengthLevel(size_t index) const override; 35 int GetSignalStrengthLevel(size_t index) const override;
36 bool IsConnected(size_t index) const override; 36 bool IsConnected(size_t index) const override;
37 bool IsPaired(size_t index) const override; 37 bool IsPaired(size_t index) const override;
38 base::string16 GetOption(size_t index) const override; 38 base::string16 GetOption(size_t index) const override;
39 void RefreshOptions() override; 39 void RefreshOptions() override;
40 void OpenAdapterOffHelpUrl() const override;
40 base::string16 GetStatus() const override; 41 base::string16 GetStatus() const override;
41 void Select(size_t index) override; 42 void Select(size_t index) override;
42 void Cancel() override; 43 void Cancel() override;
43 void Close() override; 44 void Close() override;
44 void OpenHelpCenterUrl() const override; 45 void OpenHelpCenterUrl() const override;
45 46
46 // Update the state of the Bluetooth adapter. 47 // Update the state of the Bluetooth adapter.
47 void OnAdapterPresenceChanged( 48 void OnAdapterPresenceChanged(
48 content::BluetoothChooser::AdapterPresence presence); 49 content::BluetoothChooser::AdapterPresence presence);
49 50
(...skipping 28 matching lines...) Expand all
78 // Clears |device_names_and_ids_| and |device_name_counts_|. Called when 79 // Clears |device_names_and_ids_| and |device_name_counts_|. Called when
79 // Bluetooth adapter is turned on or off, or when re-scan happens. 80 // Bluetooth adapter is turned on or off, or when re-scan happens.
80 void ClearAllDevices(); 81 void ClearAllDevices();
81 82
82 std::vector<BluetoothDeviceInfo> devices_; 83 std::vector<BluetoothDeviceInfo> devices_;
83 std::unordered_map<std::string, base::string16> device_id_to_name_map_; 84 std::unordered_map<std::string, base::string16> device_id_to_name_map_;
84 // Maps from device name to number of devices with that name. 85 // Maps from device name to number of devices with that name.
85 std::unordered_map<base::string16, int> device_name_counts_; 86 std::unordered_map<base::string16, int> device_name_counts_;
86 87
87 content::BluetoothChooser::EventHandler event_handler_; 88 content::BluetoothChooser::EventHandler event_handler_;
88 base::string16 no_devices_text_;
89 base::string16 status_text_; 89 base::string16 status_text_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(BluetoothChooserController); 91 DISALLOW_COPY_AND_ASSIGN(BluetoothChooserController);
92 }; 92 };
93 93
94 #endif // CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTROLLER_H_ 94 #endif // CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698