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

Side by Side Diff: chrome/browser/chooser_controller/chooser_controller.h

Issue 2304213002: Show device connection and paired status in chooser on Mac (Closed)
Patch Set: use vector icons Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_
6 #define CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_ 6 #define CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 virtual size_t NumOptions() const = 0; 78 virtual size_t NumOptions() const = 0;
79 79
80 // The signal strength level (0-4 inclusive) of the device at |index|, which 80 // The signal strength level (0-4 inclusive) of the device at |index|, which
81 // is used to retrieve the corresponding icon to be displayed before the 81 // is used to retrieve the corresponding icon to be displayed before the
82 // text. Returns -1 if no icon should be shown. 82 // text. Returns -1 if no icon should be shown.
83 virtual int GetSignalStrengthLevel(size_t index) const; 83 virtual int GetSignalStrengthLevel(size_t index) const;
84 84
85 // The |index|th option string which is listed in the chooser. 85 // The |index|th option string which is listed in the chooser.
86 virtual base::string16 GetOption(size_t index) const = 0; 86 virtual base::string16 GetOption(size_t index) const = 0;
87 87
88 // Returns if the |index|th option is connected.
Jeffrey Yasskin 2016/09/07 02:01:47 For virtual functions with a default, mention the
juncai 2016/09/09 20:06:15 Done.
89 virtual bool IsConnected(size_t index) const;
90
91 // Returns if the |index|th option is paired.
92 virtual bool IsPaired(size_t index) const;
93
88 // Refresh the list of options. 94 // Refresh the list of options.
89 virtual void RefreshOptions() = 0; 95 virtual void RefreshOptions() = 0;
90 96
91 // Returns the status text to be shown in the chooser. 97 // Returns the status text to be shown in the chooser.
92 virtual base::string16 GetStatus() const = 0; 98 virtual base::string16 GetStatus() const = 0;
93 99
94 // These three functions are called just before this object is destroyed: 100 // These three functions are called just before this object is destroyed:
95 101
96 // Called when the user selects the |index|th element from the dialog. 102 // Called when the user selects the |index|th element from the dialog.
97 virtual void Select(size_t index) = 0; 103 virtual void Select(size_t index) = 0;
(...skipping 15 matching lines...) Expand all
113 private: 119 private:
114 content::RenderFrameHost* const owning_frame_; 120 content::RenderFrameHost* const owning_frame_;
115 const int title_string_id_origin_; 121 const int title_string_id_origin_;
116 const int title_string_id_extension_; 122 const int title_string_id_extension_;
117 View* view_ = nullptr; 123 View* view_ = nullptr;
118 124
119 DISALLOW_COPY_AND_ASSIGN(ChooserController); 125 DISALLOW_COPY_AND_ASSIGN(ChooserController);
120 }; 126 };
121 127
122 #endif // CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_ 128 #endif // CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698