Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 virtual void OnAdapterEnabledChanged(bool enabled) = 0; | 55 virtual void OnAdapterEnabledChanged(bool enabled) = 0; |
| 56 | 56 |
| 57 // Called when refreshing options is in progress or complete. | 57 // Called when refreshing options is in progress or complete. |
| 58 virtual void OnRefreshStateChanged(bool refreshing) = 0; | 58 virtual void OnRefreshStateChanged(bool refreshing) = 0; |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 virtual ~View() {} | 61 virtual ~View() {} |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 // Returns the text to be displayed in the chooser title. | 64 // Returns the text to be displayed in the chooser title. |
| 65 base::string16 GetTitle() const; | 65 virtual base::string16 GetTitle() const; |
|
Jeffrey Yasskin
2017/06/15 21:33:42
I'm a little unhappy with making this configurable
Bret
2017/06/15 21:54:42
It's so that MockChooserController can have a titl
| |
| 66 | 66 |
| 67 // Returns if the chooser needs to show an icon before the text. | 67 // Returns if the chooser needs to show an icon before the text. |
| 68 // For WebBluetooth, it is a signal strength icon. | 68 // For WebBluetooth, it is a signal strength icon. |
| 69 virtual bool ShouldShowIconBeforeText() const; | 69 virtual bool ShouldShowIconBeforeText() const; |
| 70 | 70 |
| 71 // Returns if the chooser needs to show a footnote view. | 71 // Returns if the chooser needs to show a footnote view. |
| 72 virtual bool ShouldShowFootnoteView() const; | 72 virtual bool ShouldShowFootnoteView() const; |
| 73 | 73 |
| 74 // Returns if the chooser allows multiple items to be selected. | 74 // Returns if the chooser allows multiple items to be selected. |
| 75 virtual bool AllowMultipleSelection() const; | 75 virtual bool AllowMultipleSelection() const; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 View* view() const { return view_; } | 131 View* view() const { return view_; } |
| 132 | 132 |
| 133 private: | 133 private: |
| 134 base::string16 title_; | 134 base::string16 title_; |
| 135 View* view_ = nullptr; | 135 View* view_ = nullptr; |
| 136 | 136 |
| 137 DISALLOW_COPY_AND_ASSIGN(ChooserController); | 137 DISALLOW_COPY_AND_ASSIGN(ChooserController); |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 #endif // CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_ | 140 #endif // CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_ |
| OLD | NEW |