| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 virtual ~View() {} | 59 virtual ~View() {} |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 // Returns the text to be displayed in the chooser title. | 62 // Returns the text to be displayed in the chooser title. |
| 63 base::string16 GetTitle() const; | 63 base::string16 GetTitle() const; |
| 64 | 64 |
| 65 // Returns if the chooser needs to show an icon before the text. | 65 // Returns if the chooser needs to show an icon before the text. |
| 66 // For WebBluetooth, it is a signal strength icon. | 66 // For WebBluetooth, it is a signal strength icon. |
| 67 virtual bool ShouldShowIconBeforeText() const; | 67 virtual bool ShouldShowIconBeforeText() const; |
| 68 | 68 |
| 69 // Returns if the chooser allows multiple items to be selected. |
| 70 virtual bool AllowMultipleSelection() const; |
| 71 |
| 69 // Returns the text to be displayed in the chooser when there are no options. | 72 // Returns the text to be displayed in the chooser when there are no options. |
| 70 virtual base::string16 GetNoOptionsText() const = 0; | 73 virtual base::string16 GetNoOptionsText() const = 0; |
| 71 | 74 |
| 72 // Returns the label for OK button. | 75 // Returns the label for OK button. |
| 73 virtual base::string16 GetOkButtonLabel() const = 0; | 76 virtual base::string16 GetOkButtonLabel() const = 0; |
| 74 | 77 |
| 75 // The number of options users can pick from. For example, it can be | 78 // The number of options users can pick from. For example, it can be |
| 76 // the number of USB/Bluetooth device names which are listed in the | 79 // the number of USB/Bluetooth device names which are listed in the |
| 77 // chooser so that users can grant permission. | 80 // chooser so that users can grant permission. |
| 78 virtual size_t NumOptions() const = 0; | 81 virtual size_t NumOptions() const = 0; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 private: | 127 private: |
| 125 content::RenderFrameHost* const owning_frame_; | 128 content::RenderFrameHost* const owning_frame_; |
| 126 const int title_string_id_origin_; | 129 const int title_string_id_origin_; |
| 127 const int title_string_id_extension_; | 130 const int title_string_id_extension_; |
| 128 View* view_ = nullptr; | 131 View* view_ = nullptr; |
| 129 | 132 |
| 130 DISALLOW_COPY_AND_ASSIGN(ChooserController); | 133 DISALLOW_COPY_AND_ASSIGN(ChooserController); |
| 131 }; | 134 }; |
| 132 | 135 |
| 133 #endif // CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_ | 136 #endif // CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_ |
| OLD | NEW |