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

Unified Diff: chrome/browser/chooser_controller/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: address comments 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/chooser_controller/chooser_controller.h
diff --git a/chrome/browser/chooser_controller/chooser_controller.h b/chrome/browser/chooser_controller/chooser_controller.h
index 7ed166fe8b1332c9ba822401fd03df3958b648af..d5d3583218d4708d1b18e544ce5ca3bac2119cb9 100644
--- a/chrome/browser/chooser_controller/chooser_controller.h
+++ b/chrome/browser/chooser_controller/chooser_controller.h
@@ -46,6 +46,12 @@ class ChooserController {
// since the options have already been updated.
virtual void OnOptionRemoved(size_t index) = 0;
+ // Called when the device adapter is turned on or off.
+ virtual void AdapterEnabled(bool enabled) = 0;
msw 2016/07/18 23:01:30 nit: OnAdapterEnabledChanged? SetAdapterEnabled?
juncai 2016/07/19 20:42:45 Done.
+
+ // Called when refreshing options is in progress or complete.
+ virtual void SetRefreshing(bool refreshing) = 0;
msw 2016/07/18 23:01:30 nit: OnRefreshStateChanged?
juncai 2016/07/19 20:42:45 Done.
+
protected:
virtual ~Observer() {}
};
@@ -53,6 +59,9 @@ class ChooserController {
// Returns the text to be displayed in the chooser title.
base::string16 GetTitle() const;
+ // Returns the text to be displayed in the chooser when there is no option.
Reilly Grant (use Gerrit) 2016/07/18 21:15:03 s/is no option/are no options/
juncai 2016/07/19 20:42:45 Done.
+ virtual base::string16 GetNoOptionsText() const = 0;
+
// Returns the label for OK button.
virtual base::string16 GetOkButtonLabel() const = 0;
@@ -64,6 +73,12 @@ class ChooserController {
// The |index|th option string which is listed in the chooser.
virtual base::string16 GetOption(size_t index) const = 0;
+ // Refresh the list of options.
+ virtual void RefreshOptions() = 0;
+
+ // Returns the status text to be shown in the chooser.
+ virtual base::string16 GetStatus() const = 0;
+
// These three functions are called just before this object is destroyed:
// Called when the user selects the |index|th element from the dialog.

Powered by Google App Engine
This is Rietveld 408576698