Index: ui/app_list/search_box_model.h |
diff --git a/ui/app_list/search_box_model.h b/ui/app_list/search_box_model.h |
index 764281fc869ada08d6674d6405abfbcf7ab2391f..e252fdf3b886df831d1b521fce6d38f49584318f 100644 |
--- a/ui/app_list/search_box_model.h |
+++ b/ui/app_list/search_box_model.h |
@@ -23,13 +23,36 @@ class SearchBoxModelObserver; |
// text, cursor position and selected text in edit control. |
class APP_LIST_EXPORT SearchBoxModel { |
public: |
+ // The properties of the button on the right side of edit box. |
+ struct RightButtonProperty { |
xiyuan
2013/11/12 03:09:25
nit: Can we use a more specific name? RightButton
Jun Mukai
2013/11/12 19:24:09
Done.
|
+ gfx::ImageSkia icon; |
+ gfx::ImageSkia toggled_icon; |
+ base::string16 tooltip; |
+ base::string16 toggled_tooltip; |
+ |
+ RightButtonProperty(const gfx::ImageSkia& icon, |
+ const gfx::ImageSkia& toggled_icon, |
+ const base::string16& tooltip, |
+ const base::string16& toggled_tooltip); |
+ ~RightButtonProperty(); |
xiyuan
2013/11/12 03:09:25
nit: Move ctor and dtor before the member variable
Jun Mukai
2013/11/12 19:24:09
Done.
|
+ }; |
+ |
SearchBoxModel(); |
~SearchBoxModel(); |
- // Sets/gets the icon on side of edit box. |
+ // Sets/gets the icon on the left side of edit box. |
void SetIcon(const gfx::ImageSkia& icon); |
const gfx::ImageSkia& icon() const { return icon_; } |
+ // Sets/gets the properties for the button on the right side of edit box. |
+ void SetRightButton(scoped_ptr<RightButtonProperty> right_button_prop); |
+ const RightButtonProperty* right_button() const { |
+ return right_button_prop_.get(); |
+ } |
+ |
+ // Sets the right button state. |
+ void SetRightButtonState(bool toggled); |
+ |
// Sets/gets the hint text to display when there is in input. |
void SetHintText(const base::string16& hint_text); |
const base::string16& hint_text() const { return hint_text_; } |
@@ -49,6 +72,7 @@ class APP_LIST_EXPORT SearchBoxModel { |
private: |
gfx::ImageSkia icon_; |
+ scoped_ptr<RightButtonProperty> right_button_prop_; |
base::string16 hint_text_; |
gfx::SelectionModel selection_model_; |
base::string16 text_; |