Chromium Code Reviews| 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 00f6630b6ece027ea69f88effc28d00500e002fe..f4e864fee3699a01e15ede06455a8bc2d4a889e3 100644 |
| --- a/chrome/browser/ui/app_list/app_list_view_delegate.cc |
| +++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc |
| @@ -281,7 +281,7 @@ void AppListViewDelegate::StartSearch() { |
| controller_->OnSearchStarted(); |
| } |
| if (search_answer_delegate_) |
| - search_answer_delegate_->Update(); |
| + search_answer_delegate_->Update(is_voice_query_); |
| } |
| void AppListViewDelegate::StopSearch() { |
| @@ -297,6 +297,7 @@ void AppListViewDelegate::OpenSearchResult( |
| base::RecordAction(base::UserMetricsAction("AppList_AutoLaunched")); |
| search_controller_->OpenResult(result, event_flags); |
| is_voice_query_ = false; |
| + model_->search_box()->SetText(base::string16()); |
|
xiyuan
2017/04/27 21:59:30
Is this necessary? This would trigger another Star
vadimt
2017/04/27 22:14:37
This is a fundamentally correct thing to do.
We sh
xiyuan
2017/04/27 22:29:20
It will cause searches in other search providers.
vadimt
2017/04/29 00:48:28
Done.
Moved is_voice_query_ from AppListViewDelega
|
| } |
| void AppListViewDelegate::InvokeSearchResultAction( |
| @@ -315,6 +316,7 @@ void AppListViewDelegate::AutoLaunchCanceled() { |
| base::RecordAction(base::UserMetricsAction("AppList_AutoLaunchCanceled")); |
| // Cancelling the auto launch means we are no longer in a voice query. |
| is_voice_query_ = false; |
| + model_->search_box()->SetText(base::string16()); |
| } |
| auto_launch_timeout_ = base::TimeDelta(); |
| } |
| @@ -531,7 +533,7 @@ void AppListViewDelegate::OnTemplateURLServiceChanged() { |
| SEARCH_ENGINE_GOOGLE; |
| model_->SetSearchEngineIsGoogle(is_google); |
| - search_answer_delegate_->Update(); |
| + search_answer_delegate_->Update(is_voice_query_); |
| app_list::StartPageService* start_page_service = |
| app_list::StartPageService::Get(profile_); |