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

Unified Diff: ui/app_list/views/search_box_view.cc

Issue 164193005: Refactors the auto-launch logic and adds tests for it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win error 2 Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/views/search_box_view.h ('k') | ui/app_list/views/search_box_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/search_box_view.cc
diff --git a/ui/app_list/views/search_box_view.cc b/ui/app_list/views/search_box_view.cc
index aee2c2f0edd9f5a732f50e65b66fdb3efe32f8cb..557cc21758ff49e6f7497a92a8bc3b24d4c1357a 100644
--- a/ui/app_list/views/search_box_view.cc
+++ b/ui/app_list/views/search_box_view.cc
@@ -12,7 +12,6 @@
#include "ui/app_list/search_box_model.h"
#include "ui/app_list/speech_ui_model.h"
#include "ui/app_list/views/app_list_menu_views.h"
-#include "ui/app_list/views/contents_view.h"
#include "ui/app_list/views/search_box_view_delegate.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -98,6 +97,7 @@ bool SearchBoxView::HasSearch() const {
void SearchBoxView::ClearSearch() {
search_box_->SetText(base::string16());
+ view_delegate_->AutoLaunchCanceled();
// Updates model and fires query changed manually because SetText() above
// does not generate ContentsChanged() notification.
UpdateModel();
@@ -179,7 +179,7 @@ void SearchBoxView::NotifyQueryChanged() {
void SearchBoxView::ContentsChanged(views::Textfield* sender,
const base::string16& new_contents) {
UpdateModel();
- contents_view_->CancelAutoLaunch();
+ view_delegate_->AutoLaunchCanceled();
NotifyQueryChanged();
}
« no previous file with comments | « ui/app_list/views/search_box_view.h ('k') | ui/app_list/views/search_box_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698