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

Unified Diff: ui/app_list/search_box_model.h

Issue 149753002: Enables the 'hotword not listening' icon in the search box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix breaks Created 6 years, 11 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
« no previous file with comments | « chrome/browser/ui/webui/app_list/start_page_handler.cc ('k') | ui/app_list/search_box_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1c174819bf5d91af215bc63baa7e7a5f132d8517..0512c2e195a0f69897c3248eeeefd985900ba690 100644
--- a/ui/app_list/search_box_model.h
+++ b/ui/app_list/search_box_model.h
@@ -23,13 +23,21 @@ class SearchBoxModelObserver;
// text, cursor position and selected text in edit control.
class APP_LIST_EXPORT SearchBoxModel {
public:
- // The properties of the button.
- struct APP_LIST_EXPORT ButtonProperty {
- ButtonProperty(const gfx::ImageSkia& icon, const base::string16& tooltip);
- ~ButtonProperty();
-
- gfx::ImageSkia icon;
- base::string16 tooltip;
+ // The properties of the speech button.
+ struct APP_LIST_EXPORT SpeechButtonProperty {
+ SpeechButtonProperty(const gfx::ImageSkia& on_icon,
+ const base::string16& on_tooltip,
+ const gfx::ImageSkia& off_icon,
+ const base::string16& off_tooltip);
+ ~SpeechButtonProperty();
+
+ // The icon/tooltip when the hotword is on.
+ gfx::ImageSkia on_icon;
+ base::string16 on_tooltip;
+
+ // The icon/tooltip when the hotword is off.
+ gfx::ImageSkia off_icon;
+ base::string16 off_tooltip;
};
SearchBoxModel();
@@ -40,8 +48,11 @@ class APP_LIST_EXPORT SearchBoxModel {
const gfx::ImageSkia& icon() const { return icon_; }
// Sets/gets the properties for the button of speech recognition.
- void SetSpeechRecognitionButton(scoped_ptr<ButtonProperty> speech_button);
- const ButtonProperty* speech_button() const { return speech_button_.get(); }
+ void SetSpeechRecognitionButton(
+ scoped_ptr<SpeechButtonProperty> speech_button);
+ const SpeechButtonProperty* speech_button() const {
+ return speech_button_.get();
+ }
// Sets/gets the hint text to display when there is in input.
void SetHintText(const base::string16& hint_text);
@@ -62,7 +73,7 @@ class APP_LIST_EXPORT SearchBoxModel {
private:
gfx::ImageSkia icon_;
- scoped_ptr<ButtonProperty> speech_button_;
+ scoped_ptr<SpeechButtonProperty> speech_button_;
base::string16 hint_text_;
gfx::SelectionModel selection_model_;
base::string16 text_;
« no previous file with comments | « chrome/browser/ui/webui/app_list/start_page_handler.cc ('k') | ui/app_list/search_box_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698