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

Unified Diff: chrome/browser/chooser_controller/chooser_controller.h

Issue 2245603003: Add signal strength indicator icon to WebBluetooth chooser on non-Mac desktops (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address more comments Created 4 years, 4 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 | « no previous file | chrome/browser/chooser_controller/chooser_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chooser_controller/chooser_controller.h
diff --git a/chrome/browser/chooser_controller/chooser_controller.h b/chrome/browser/chooser_controller/chooser_controller.h
index 9fe26d0cb45098db6664b3d143e7055652a46142..6a58361c614650682ac071d4dbbd71f466b32407 100644
--- a/chrome/browser/chooser_controller/chooser_controller.h
+++ b/chrome/browser/chooser_controller/chooser_controller.h
@@ -62,6 +62,10 @@ class ChooserController {
// Returns the text to be displayed in the chooser title.
base::string16 GetTitle() const;
+ // Returns if the chooser needs to show an icon before the text.
+ // For WebBluetooth, it is a signal strength icon.
+ virtual bool ShouldShowIconBeforeText() const;
+
// Returns the text to be displayed in the chooser when there are no options.
virtual base::string16 GetNoOptionsText() const = 0;
@@ -73,6 +77,11 @@ class ChooserController {
// chooser so that users can grant permission.
virtual size_t NumOptions() const = 0;
+ // The signal strength level (0-4 inclusive) of the device at |index|, which
+ // is used to retrieve the corresponding icon to be displayed before the
+ // text. Returns -1 if no icon should be shown.
+ virtual int GetSignalStrengthLevel(size_t index) const;
+
// The |index|th option string which is listed in the chooser.
virtual base::string16 GetOption(size_t index) const = 0;
« no previous file with comments | « no previous file | chrome/browser/chooser_controller/chooser_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698