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

Unified Diff: ui/app_list/views/search_box_view.cc

Issue 105773004: Introduces the speech recognition UI to app_list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 | « ui/app_list/views/search_box_view.h ('k') | ui/app_list/views/speech_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/search_box_view.cc
diff --git a/ui/app_list/views/search_box_view.cc b/ui/app_list/views/search_box_view.cc
index ba40bf3b5f346c5bac1621c84b4ecafd3abdb9f5..8344dc20986ec249220276ec7b2dae87ebb08f66 100644
--- a/ui/app_list/views/search_box_view.cc
+++ b/ui/app_list/views/search_box_view.cc
@@ -201,19 +201,16 @@ void SearchBoxView::IconChanged() {
}
void SearchBoxView::SpeechRecognitionButtonPropChanged() {
- const SearchBoxModel::ToggleButtonProperty* speech_button_prop =
+ const SearchBoxModel::ButtonProperty* speech_button_prop =
model_->search_box()->speech_button();
if (speech_button_prop) {
if (!speech_button_) {
- speech_button_ = new views::ToggleImageButton(this);
+ speech_button_ = new views::ImageButton(this);
AddChildView(speech_button_);
}
speech_button_->SetImage(views::Button::STATE_NORMAL,
&speech_button_prop->icon);
- speech_button_->SetToggledImage(views::Button::STATE_NORMAL,
- &speech_button_prop->toggled_icon);
speech_button_->SetTooltipText(speech_button_prop->tooltip);
- speech_button_->SetToggledTooltipText(speech_button_prop->toggled_tooltip);
} else {
if (speech_button_) {
// Deleting a view will detach it from its parent.
@@ -223,11 +220,6 @@ void SearchBoxView::SpeechRecognitionButtonPropChanged() {
}
}
-void SearchBoxView::SetSpeechRecognitionButtonState(bool toggled) {
- if (speech_button_)
- speech_button_->SetToggled(toggled);
-}
-
void SearchBoxView::HintTextChanged() {
search_box_->set_placeholder_text(model_->search_box()->hint_text());
}
« no previous file with comments | « ui/app_list/views/search_box_view.h ('k') | ui/app_list/views/speech_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698