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

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

Issue 79773005: Update app list search box menu when Users changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add AppListViewDelegateObserver Created 7 years, 1 month 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
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 ba40bf3b5f346c5bac1621c84b4ecafd3abdb9f5..bb3ae15385edafa52632e3e9ad4d8735844225e0 100644
--- a/ui/app_list/views/search_box_view.cc
+++ b/ui/app_list/views/search_box_view.cc
@@ -72,6 +72,8 @@ SearchBoxView::SearchBoxView(SearchBoxViewDelegate* delegate,
AddChildView(search_box_);
model_->search_box()->AddObserver(this);
+ view_delegate_->AddObserver(this);
+
IconChanged();
SpeechRecognitionButtonPropChanged();
HintTextChanged();
@@ -79,6 +81,7 @@ SearchBoxView::SearchBoxView(SearchBoxViewDelegate* delegate,
SearchBoxView::~SearchBoxView() {
model_->search_box()->RemoveObserver(this);
+ view_delegate_->RemoveObserver(this);
}
bool SearchBoxView::HasSearch() const {
@@ -241,4 +244,8 @@ void SearchBoxView::TextChanged() {
NotifyQueryChanged();
}
+void SearchBoxView::OnUsersChanged() {
+ InvalidateMenu();
+}
+
} // namespace app_list
« ui/app_list/app_list_view_delegate.h ('K') | « ui/app_list/views/search_box_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698