| OLD | NEW |
| 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/app_list_view.h" | 5 #include "ui/app_list/views/app_list_view.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
| 10 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 435 |
| 436 // Whether we need to signin or not may have changed since last time we were | 436 // Whether we need to signin or not may have changed since last time we were |
| 437 // shown. | 437 // shown. |
| 438 Layout(); | 438 Layout(); |
| 439 } | 439 } |
| 440 | 440 |
| 441 void AppListView::OnSpeechRecognitionStateChanged( | 441 void AppListView::OnSpeechRecognitionStateChanged( |
| 442 SpeechRecognitionState new_state) { | 442 SpeechRecognitionState new_state) { |
| 443 DCHECK(!signin_view_->visible()); | 443 DCHECK(!signin_view_->visible()); |
| 444 | 444 |
| 445 bool recognizing = new_state != SPEECH_RECOGNITION_NOT_STARTED; | 445 bool recognizing = (new_state == SPEECH_RECOGNITION_RECOGNIZING || |
| 446 new_state == SPEECH_RECOGNITION_IN_SPEECH); |
| 446 // No change for this class. | 447 // No change for this class. |
| 447 if (speech_view_->visible() == recognizing) | 448 if (speech_view_->visible() == recognizing) |
| 448 return; | 449 return; |
| 449 | 450 |
| 450 if (recognizing) | 451 if (recognizing) |
| 451 speech_view_->Reset(); | 452 speech_view_->Reset(); |
| 452 | 453 |
| 453 #if defined(USE_AURA) | 454 #if defined(USE_AURA) |
| 454 animation_observer_->set_frame(GetBubbleFrameView()); | 455 animation_observer_->set_frame(GetBubbleFrameView()); |
| 455 gfx::Transform speech_transform; | 456 gfx::Transform speech_transform; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 #else | 491 #else |
| 491 speech_view_->SetVisible(recognizing); | 492 speech_view_->SetVisible(recognizing); |
| 492 app_list_main_view_->SetVisible(!recognizing); | 493 app_list_main_view_->SetVisible(!recognizing); |
| 493 | 494 |
| 494 // Needs to schedule paint of AppListView itself, to repaint the background. | 495 // Needs to schedule paint of AppListView itself, to repaint the background. |
| 495 GetBubbleFrameView()->SchedulePaint(); | 496 GetBubbleFrameView()->SchedulePaint(); |
| 496 #endif | 497 #endif |
| 497 } | 498 } |
| 498 | 499 |
| 499 } // namespace app_list | 500 } // namespace app_list |
| OLD | NEW |