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

Unified Diff: ui/app_list/app_list_view_delegate.h

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
« no previous file with comments | « ui/app_list/app_list.gyp ('k') | ui/app_list/app_list_view_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/app_list_view_delegate.h
diff --git a/ui/app_list/app_list_view_delegate.h b/ui/app_list/app_list_view_delegate.h
index 4da51a67ee6384eaf72e0c08d0e2ce47b4af2744..fb98a736f8e1925075e5ed7513b204d027d22db5 100644
--- a/ui/app_list/app_list_view_delegate.h
+++ b/ui/app_list/app_list_view_delegate.h
@@ -10,6 +10,7 @@
#include "base/callback_forward.h"
#include "base/files/file_path.h"
+#include "base/observer_list.h"
#include "base/strings/string16.h"
#include "ui/app_list/app_list_export.h"
@@ -29,6 +30,7 @@ namespace app_list {
class AppListItemModel;
class AppListModel;
+class AppListViewDelegateObserver;
class SearchResult;
class SigninDelegate;
@@ -53,6 +55,8 @@ class APP_LIST_EXPORT AppListViewDelegate {
};
typedef std::vector<User> Users;
+ AppListViewDelegate() {}
tapted 2013/11/22 00:03:19 heads-up clang will probably complain about this a
+
// AppListView owns the delegate.
virtual ~AppListViewDelegate() {}
@@ -123,7 +127,19 @@ class APP_LIST_EXPORT AppListViewDelegate {
virtual content::WebContents* GetStartPageContents() = 0;
// Returns the list of users (for AppListMenu).
- virtual const Users& GetUsers() const = 0;
+ const Users& GetUsers() const;
+
+ void AddObserver(AppListViewDelegateObserver* observer);
+ void RemoveObserver(AppListViewDelegateObserver* observer);
+
+ protected:
+ void NotifyUsersChanged();
+
+ Users users_;
+ ObserverList<AppListViewDelegateObserver> observers_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate);
};
} // namespace app_list
« no previous file with comments | « ui/app_list/app_list.gyp ('k') | ui/app_list/app_list_view_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698