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

Side by Side Diff: chrome/browser/ui/app_list/app_list_view_delegate.h

Issue 23179002: Update the app launcher menu on profile name change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@le_refactor_gigante_signin_into_model
Patch Set: rebase Created 7 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_view_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "chrome/browser/profiles/profile_info_cache_observer.h"
14 #include "content/public/browser/notification_observer.h" 15 #include "content/public/browser/notification_observer.h"
15 #include "content/public/browser/notification_registrar.h" 16 #include "content/public/browser/notification_registrar.h"
16 #include "ui/app_list/app_list_view_delegate.h" 17 #include "ui/app_list/app_list_view_delegate.h"
17 #include "ui/app_list/signin_delegate_observer.h" 18 #include "ui/app_list/signin_delegate_observer.h"
18 19
19 class AppListControllerDelegate; 20 class AppListControllerDelegate;
20 class AppsModelBuilder; 21 class AppsModelBuilder;
21 class Profile; 22 class Profile;
22 23
23 namespace app_list { 24 namespace app_list {
(...skipping 12 matching lines...) Expand all
36 namespace gfx { 37 namespace gfx {
37 class ImageSkia; 38 class ImageSkia;
38 } 39 }
39 40
40 #if defined(USE_ASH) 41 #if defined(USE_ASH)
41 class AppSyncUIStateWatcher; 42 class AppSyncUIStateWatcher;
42 #endif 43 #endif
43 44
44 class AppListViewDelegate : public app_list::AppListViewDelegate, 45 class AppListViewDelegate : public app_list::AppListViewDelegate,
45 public app_list::SigninDelegateObserver, 46 public app_list::SigninDelegateObserver,
46 public content::NotificationObserver { 47 public content::NotificationObserver,
48 public ProfileInfoCacheObserver {
47 public: 49 public:
48 // The delegate will take ownership of the controller. 50 // The delegate will take ownership of the controller.
49 AppListViewDelegate(AppListControllerDelegate* controller, Profile* profile); 51 AppListViewDelegate(AppListControllerDelegate* controller, Profile* profile);
50 virtual ~AppListViewDelegate(); 52 virtual ~AppListViewDelegate();
51 53
52 private: 54 private:
53 void OnProfileChanged(); 55 void OnProfileChanged();
54 56
55 // Overridden from app_list::AppListViewDelegate: 57 // Overridden from app_list::AppListViewDelegate:
56 virtual void SetModel(app_list::AppListModel* model) OVERRIDE; 58 virtual void SetModel(app_list::AppListModel* model) OVERRIDE;
(...skipping 18 matching lines...) Expand all
75 virtual void OpenFeedback() OVERRIDE; 77 virtual void OpenFeedback() OVERRIDE;
76 78
77 // Overridden from app_list::SigninDelegateObserver: 79 // Overridden from app_list::SigninDelegateObserver:
78 virtual void OnSigninSuccess() OVERRIDE; 80 virtual void OnSigninSuccess() OVERRIDE;
79 81
80 // Overridden from content::NotificationObserver: 82 // Overridden from content::NotificationObserver:
81 virtual void Observe(int type, 83 virtual void Observe(int type,
82 const content::NotificationSource& source, 84 const content::NotificationSource& source,
83 const content::NotificationDetails& details) OVERRIDE; 85 const content::NotificationDetails& details) OVERRIDE;
84 86
87 // Overridden from ProfileInfoCacheObserver:
88 virtual void OnProfileNameChanged(
89 const base::FilePath& profile_path,
90 const base::string16& old_profile_name) OVERRIDE;
91
85 scoped_ptr<app_list::SigninDelegate> signin_delegate_; 92 scoped_ptr<app_list::SigninDelegate> signin_delegate_;
86 scoped_ptr<AppsModelBuilder> apps_builder_; 93 scoped_ptr<AppsModelBuilder> apps_builder_;
87 scoped_ptr<app_list::SearchController> search_controller_; 94 scoped_ptr<app_list::SearchController> search_controller_;
88 scoped_ptr<AppListControllerDelegate> controller_; 95 scoped_ptr<AppListControllerDelegate> controller_;
89 Profile* profile_; 96 Profile* profile_;
90 app_list::AppListModel* model_; // Weak. Owned by AppListView. 97 app_list::AppListModel* model_; // Weak. Owned by AppListView.
91 98
92 content::NotificationRegistrar registrar_; 99 content::NotificationRegistrar registrar_;
93 #if defined(USE_ASH) 100 #if defined(USE_ASH)
94 scoped_ptr<AppSyncUIStateWatcher> app_sync_ui_state_watcher_; 101 scoped_ptr<AppSyncUIStateWatcher> app_sync_ui_state_watcher_;
95 #endif 102 #endif
96 103
97 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); 104 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate);
98 }; 105 };
99 106
100 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 107 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_view_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698