Index: chrome/browser/ui/app_list/app_list_view_delegate.cc |
diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc |
index d73fbcfc1b015d90c39136b0494c5d016469731e..fd90f670c16f877b81f5a0375d6c21a0f132b8f6 100644 |
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc |
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc |
@@ -158,6 +158,7 @@ AppListViewDelegate::AppListViewDelegate(AppListControllerDelegate* controller) |
: controller_(controller), |
profile_(NULL), |
model_(NULL), |
+ is_voice_query_(false), |
scoped_observer_(this) { |
// TODO(vadimt): Remove ScopedTracker below once crbug.com/431326 is fixed. |
tracked_objects::ScopedTracker tracking_profile( |
@@ -429,7 +430,7 @@ void AppListViewDelegate::GetShortcutPathForApp( |
void AppListViewDelegate::StartSearch() { |
if (search_controller_) { |
- search_controller_->Start(); |
+ search_controller_->Start(is_voice_query_); |
controller_->OnSearchStarted(); |
} |
} |
@@ -462,6 +463,8 @@ base::TimeDelta AppListViewDelegate::GetAutoLaunchTimeout() { |
void AppListViewDelegate::AutoLaunchCanceled() { |
base::RecordAction(base::UserMetricsAction("AppList_AutoLaunchCanceled")); |
auto_launch_timeout_ = base::TimeDelta(); |
+ // Cancelling the auto launch means we are no longer in a voice query. |
+ is_voice_query_ = false; |
} |
void AppListViewDelegate::ViewInitialized() { |
@@ -586,6 +589,7 @@ void AppListViewDelegate::OnSpeechResult(const base::string16& result, |
if (is_final) { |
auto_launch_timeout_ = base::TimeDelta::FromMilliseconds( |
kAutoLaunchDefaultTimeoutMilliSec); |
+ is_voice_query_ = true; |
model_->search_box()->SetText(result); |
} |
} |