Index: chrome/browser/ui/app_list/app_list_view_delegate.h |
diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.h b/chrome/browser/ui/app_list/app_list_view_delegate.h |
index 0b5d121dfbe3c455b6759b53ff2b7932b91e774a..9f941a8e13425d52aea31f7712278a397465bbf4 100644 |
--- a/chrome/browser/ui/app_list/app_list_view_delegate.h |
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.h |
@@ -6,12 +6,16 @@ |
#define CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
#include <string> |
+#include <vector> |
#include "base/basictypes.h" |
#include "base/callback_forward.h" |
#include "base/compiler_specific.h" |
#include "base/memory/scoped_ptr.h" |
+#include "content/public/browser/notification_observer.h" |
+#include "content/public/browser/notification_registrar.h" |
#include "ui/app_list/app_list_view_delegate.h" |
+#include "ui/app_list/signin_delegate_observer.h" |
class AppListControllerDelegate; |
class AppsModelBuilder; |
@@ -33,15 +37,21 @@ class ImageSkia; |
class AppSyncUIStateWatcher; |
#endif |
-class AppListViewDelegate : public app_list::AppListViewDelegate { |
+class AppListViewDelegate : public app_list::AppListViewDelegate, |
+ public app_list::SigninDelegateObserver, |
+ public content::NotificationObserver { |
tapted
2013/08/05 03:01:39
too many spaces before {
calamity
2013/08/08 04:52:12
Done.
|
public: |
// The delegate will take ownership of the controller. |
AppListViewDelegate(AppListControllerDelegate* controller, Profile* profile); |
virtual ~AppListViewDelegate(); |
+ virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE; |
tapted
2013/08/05 03:01:39
nit: should say where it's overridden from
calamity
2013/08/08 04:52:12
Done.
|
private: |
+ // Registers the current profile for notifications. |
+ void RegisterForNotifications(); |
+ |
// Overridden from app_list::AppListViewDelegate: |
- virtual void SetModel(app_list::AppListModel* model) OVERRIDE; |
+ virtual void InitModel(app_list::AppListModel* model) OVERRIDE; |
virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE; |
virtual void GetShortcutPathForApp( |
const std::string& app_id, |
@@ -59,17 +69,29 @@ class AppListViewDelegate : public app_list::AppListViewDelegate { |
virtual void ViewClosing() OVERRIDE; |
virtual void ViewActivationChanged(bool active) OVERRIDE; |
virtual gfx::ImageSkia GetWindowIcon() OVERRIDE; |
- virtual string16 GetCurrentUserName() OVERRIDE; |
- virtual string16 GetCurrentUserEmail() OVERRIDE; |
virtual void OpenSettings() OVERRIDE; |
virtual void OpenHelp() OVERRIDE; |
virtual void OpenFeedback() OVERRIDE; |
+ virtual void ShowForProfileByPath( |
+ const base::FilePath& profile_path) OVERRIDE; |
+ virtual void UpdateModelWithCurrentProfiles() OVERRIDE; |
+ |
+ // Overriden from app_list::SigninDelegateObserver: |
tapted
2013/08/05 03:01:39
Overriden -> overridden (spelling)
calamity
2013/08/08 04:52:12
Done.
|
+ virtual void OnSigninSuccess() OVERRIDE; |
+ |
+ // content::NotificationObserver |
tapted
2013/08/05 03:01:39
nit: Overridden from.., to be consistent
calamity
2013/08/08 04:52:12
Done.
|
+ virtual void Observe(int type, |
+ const content::NotificationSource& source, |
+ const content::NotificationDetails& details) OVERRIDE; |
scoped_ptr<app_list::SigninDelegate> signin_delegate_; |
scoped_ptr<AppsModelBuilder> apps_builder_; |
scoped_ptr<app_list::SearchController> search_controller_; |
scoped_ptr<AppListControllerDelegate> controller_; |
Profile* profile_; |
+ app_list::AppListModel* model_; // Weak. Owned by AppListView. |
+ |
+ content::NotificationRegistrar registrar_; |
#if defined(USE_ASH) |
scoped_ptr<AppSyncUIStateWatcher> app_sync_ui_state_watcher_; |