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

Unified Diff: ui/app_list/app_list_view_delegate.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/app_list_view_delegate.cc
diff --git a/ui/app_list/app_list_view_delegate.cc b/ui/app_list/app_list_view_delegate.cc
index 2156cf5065e9a246ba06b6467068b308987f44ce..c84985b820665df91f6540c73a19d426fa40bedc 100644
--- a/ui/app_list/app_list_view_delegate.cc
+++ b/ui/app_list/app_list_view_delegate.cc
@@ -4,6 +4,8 @@
#include "ui/app_list/app_list_view_delegate.h"
+#include "ui/app_list/app_list_view_delegate_observer.h"
+
namespace app_list {
AppListViewDelegate::User::User() : active(false) {
@@ -12,4 +14,23 @@ AppListViewDelegate::User::User() : active(false) {
AppListViewDelegate::User::~User() {
}
+const AppListViewDelegate::Users& AppListViewDelegate::GetUsers() const {
+ return users_;
+}
+
+void AppListViewDelegate::AddObserver(AppListViewDelegateObserver* observer) {
+ observers_.AddObserver(observer);
+}
+
+void AppListViewDelegate::RemoveObserver(
+ AppListViewDelegateObserver* observer) {
+ observers_.RemoveObserver(observer);
+}
+
+void AppListViewDelegate::NotifyUsersChanged() {
+ FOR_EACH_OBSERVER(AppListViewDelegateObserver,
+ observers_,
+ OnUsersChanged());
+}
+
} // app_list

Powered by Google App Engine
This is Rietveld 408576698