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

Side by Side Diff: ui/app_list/views/search_box_view.cc

Issue 774553002: Revert of Updates the mic icon status based on the device's audio state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/app_list/start_page_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ui/app_list/views/search_box_view.h" 5 #include "ui/app_list/views/search_box_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/app_list/app_list_constants.h" 9 #include "ui/app_list/app_list_constants.h"
10 #include "ui/app_list/app_list_model.h" 10 #include "ui/app_list/app_list_model.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 views::Button::STATE_NORMAL, &speech_button_prop->off_icon); 259 views::Button::STATE_NORMAL, &speech_button_prop->off_icon);
260 speech_button_->SetTooltipText(speech_button_prop->off_tooltip); 260 speech_button_->SetTooltipText(speech_button_prop->off_tooltip);
261 } 261 }
262 } else { 262 } else {
263 if (speech_button_) { 263 if (speech_button_) {
264 // Deleting a view will detach it from its parent. 264 // Deleting a view will detach it from its parent.
265 delete speech_button_; 265 delete speech_button_;
266 speech_button_ = NULL; 266 speech_button_ = NULL;
267 } 267 }
268 } 268 }
269 Layout();
270 } 269 }
271 270
272 void SearchBoxView::HintTextChanged() { 271 void SearchBoxView::HintTextChanged() {
273 search_box_->set_placeholder_text(model_->search_box()->hint_text()); 272 search_box_->set_placeholder_text(model_->search_box()->hint_text());
274 } 273 }
275 274
276 void SearchBoxView::SelectionModelChanged() { 275 void SearchBoxView::SelectionModelChanged() {
277 search_box_->SelectSelectionModel(model_->search_box()->selection_model()); 276 search_box_->SelectSelectionModel(model_->search_box()->selection_model());
278 } 277 }
279 278
280 void SearchBoxView::TextChanged() { 279 void SearchBoxView::TextChanged() {
281 search_box_->SetText(model_->search_box()->text()); 280 search_box_->SetText(model_->search_box()->text());
282 NotifyQueryChanged(); 281 NotifyQueryChanged();
283 } 282 }
284 283
285 void SearchBoxView::OnSpeechRecognitionStateChanged( 284 void SearchBoxView::OnSpeechRecognitionStateChanged(
286 SpeechRecognitionState new_state) { 285 SpeechRecognitionState new_state) {
287 SpeechRecognitionButtonPropChanged(); 286 SpeechRecognitionButtonPropChanged();
288 SchedulePaint(); 287 SchedulePaint();
289 } 288 }
290 289
291 } // namespace app_list 290 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/start_page_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698