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

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

Issue 2846733004: Optimization: not sending answer server requests for voice queries. (Closed)
Patch Set: Last nits Created 3 years, 7 months 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 | « ui/app_list/search_controller.cc ('k') | ui/app_list/views/search_box_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_main_view.h" 5 #include "ui/app_list/views/app_list_main_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 contents_view_ = new ContentsView(this); 80 contents_view_ = new ContentsView(this);
81 contents_view_->Init(model_); 81 contents_view_->Init(model_);
82 AddChildView(contents_view_); 82 AddChildView(contents_view_);
83 83
84 search_box_view_->set_contents_view(contents_view_); 84 search_box_view_->set_contents_view(contents_view_);
85 85
86 contents_view_->SetPaintToLayer(); 86 contents_view_->SetPaintToLayer();
87 contents_view_->layer()->SetFillsBoundsOpaquely(false); 87 contents_view_->layer()->SetFillsBoundsOpaquely(false);
88 contents_view_->layer()->SetMasksToBounds(true); 88 contents_view_->layer()->SetMasksToBounds(true);
89 89
90 delegate_->StartSearch(); 90 // Clear the old query and start search.
91 search_box_view_->ClearSearch();
91 } 92 }
92 93
93 void AppListMainView::ShowAppListWhenReady() { 94 void AppListMainView::ShowAppListWhenReady() {
94 GetWidget()->Show(); 95 GetWidget()->Show();
95 } 96 }
96 97
97 void AppListMainView::ResetForShow() { 98 void AppListMainView::ResetForShow() {
98 contents_view_->SetActiveState(AppListModel::STATE_START); 99 contents_view_->SetActiveState(AppListModel::STATE_START);
99 contents_view_->apps_container_view()->ResetForShowApps(); 100 contents_view_->apps_container_view()->ResetForShowApps();
100 // We clear the search when hiding so when app list appears it is not showing 101 // We clear the search when hiding so when app list appears it is not showing
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 contents_view_->search_results_page_view()->SetSelection(select); 213 contents_view_->search_results_page_view()->SetSelection(select);
213 } 214 }
214 215
215 void AppListMainView::OnResultInstalled(SearchResult* result) { 216 void AppListMainView::OnResultInstalled(SearchResult* result) {
216 // Clears the search to show the apps grid. The last installed app 217 // Clears the search to show the apps grid. The last installed app
217 // should be highlighted and made visible already. 218 // should be highlighted and made visible already.
218 search_box_view_->ClearSearch(); 219 search_box_view_->ClearSearch();
219 } 220 }
220 221
221 } // namespace app_list 222 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/search_controller.cc ('k') | ui/app_list/views/search_box_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698