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

Unified Diff: chrome/browser/chooser_controller/mock_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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chooser_controller/mock_chooser_controller.h
diff --git a/chrome/browser/chooser_controller/mock_chooser_controller.h b/chrome/browser/chooser_controller/mock_chooser_controller.h
index e602cf6bb2b57faaad2cb3db24f1023634b896e4..9100971af7718f887a9f153ba49fbec0b36d8cc2 100644
--- a/chrome/browser/chooser_controller/mock_chooser_controller.h
+++ b/chrome/browser/chooser_controller/mock_chooser_controller.h
@@ -24,6 +24,8 @@ class MockChooserController : public ChooserController {
size_t NumOptions() const override;
int GetSignalStrengthLevel(size_t index) const override;
base::string16 GetOption(size_t index) const override;
+ bool IsConnected(size_t index) const override;
+ bool IsPaired(size_t index) const override;
base::string16 GetStatus() const override;
MOCK_METHOD0(RefreshOptions, void());
MOCK_METHOD1(Select, void(size_t index));
@@ -36,18 +38,26 @@ class MockChooserController : public ChooserController {
void OnDiscoveryStateChanged(content::BluetoothChooser::DiscoveryState state);
void OptionAdded(const base::string16& option_name,
- int signal_strength_level);
+ int signal_strength_level,
+ bool is_connected,
Jeffrey Yasskin 2016/09/07 02:01:47 I'm unhappy with adjacent boolean arguments. Would
juncai 2016/09/09 20:06:15 Done.
+ bool is_paired);
void OptionRemoved(const base::string16& option_name);
void OptionUpdated(const base::string16& previous_option_name,
const base::string16& new_option_name,
- int new_signal_strengh_level);
+ int new_signal_strengh_level,
+ bool new_is_connected,
+ bool new_is_paired);
- static const int kNoImage;
+ static const int kNoSignalStrengthLevelImage;
static const int kSignalStrengthLevel0Bar;
static const int kSignalStrengthLevel1Bar;
static const int kSignalStrengthLevel2Bar;
static const int kSignalStrengthLevel3Bar;
static const int kSignalStrengthLevel4Bar;
+ static const bool kConnected;
+ static const bool kNotConnected;
+ static const bool kPaired;
+ static const bool kNotPaired;
private:
void ClearAllOptions();
@@ -55,6 +65,8 @@ class MockChooserController : public ChooserController {
struct OptionInfo {
base::string16 name;
int signal_strength_level;
+ bool is_connected;
+ bool is_paired;
};
std::vector<OptionInfo> options_;

Powered by Google App Engine
This is Rietveld 408576698