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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 // from inside a call to OnOptionRemoved will NOT see the removed string | 45 // from inside a call to OnOptionRemoved will NOT see the removed string |
| 46 // since the options have already been updated. | 46 // since the options have already been updated. |
| 47 virtual void OnOptionRemoved(size_t index) = 0; | 47 virtual void OnOptionRemoved(size_t index) = 0; |
| 48 | 48 |
| 49 // Called when the device adapter is turned on or off. | 49 // Called when the device adapter is turned on or off. |
| 50 virtual void OnAdapterEnabledChanged(bool enabled) = 0; | 50 virtual void OnAdapterEnabledChanged(bool enabled) = 0; |
| 51 | 51 |
| 52 // Called when refreshing options is in progress or complete. | 52 // Called when refreshing options is in progress or complete. |
| 53 virtual void OnRefreshStateChanged(bool refreshing) = 0; | 53 virtual void OnRefreshStateChanged(bool refreshing) = 0; |
| 54 | 54 |
| 55 // Called when refreshing options is still in progress but found at least | |
| 56 // one option. Only need to be called when the first option is added. | |
| 57 virtual void OnOptionAvailableDuringRefresh() = 0; | |
|
Reilly Grant (use Gerrit)
2016/07/28 22:03:04
This method seems unnecessary. If OnOptionAdded()
juncai
2016/07/29 00:45:21
Good point! Removed this function.
Done.
| |
| 58 | |
| 55 protected: | 59 protected: |
| 56 virtual ~View() {} | 60 virtual ~View() {} |
| 57 }; | 61 }; |
| 58 | 62 |
| 59 // Returns the text to be displayed in the chooser title. | 63 // Returns the text to be displayed in the chooser title. |
| 60 base::string16 GetTitle() const; | 64 base::string16 GetTitle() const; |
| 61 | 65 |
| 62 // Returns the text to be displayed in the chooser when there are no options. | 66 // Returns the text to be displayed in the chooser when there are no options. |
| 63 virtual base::string16 GetNoOptionsText() const = 0; | 67 virtual base::string16 GetNoOptionsText() const = 0; |
| 64 | 68 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 private: | 105 private: |
| 102 content::RenderFrameHost* const owning_frame_; | 106 content::RenderFrameHost* const owning_frame_; |
| 103 const int title_string_id_origin_; | 107 const int title_string_id_origin_; |
| 104 const int title_string_id_extension_; | 108 const int title_string_id_extension_; |
| 105 View* view_ = nullptr; | 109 View* view_ = nullptr; |
| 106 | 110 |
| 107 DISALLOW_COPY_AND_ASSIGN(ChooserController); | 111 DISALLOW_COPY_AND_ASSIGN(ChooserController); |
| 108 }; | 112 }; |
| 109 | 113 |
| 110 #endif // CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_ | 114 #endif // CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_ |
| OLD | NEW |