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

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

Issue 1631373003: Refactor ProfileInfoCache in c/b/ui/app_list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments, add sorting of ProfileAttributesEntry Created 4 years, 10 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
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector>
tapted 2016/01/31 23:04:37 nit: also not required - see below
11 12
12 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
13 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
16 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
17 #include "base/memory/scoped_vector.h" 18 #include "base/memory/scoped_vector.h"
18 #include "base/observer_list.h" 19 #include "base/observer_list.h"
19 #include "base/scoped_observer.h" 20 #include "base/scoped_observer.h"
20 #include "chrome/browser/profiles/profile_info_cache_observer.h" 21 #include "chrome/browser/profiles/profile_attributes_storage.h"
21 #include "chrome/browser/search/hotword_client.h" 22 #include "chrome/browser/search/hotword_client.h"
22 #include "chrome/browser/signin/signin_manager_factory.h" 23 #include "chrome/browser/signin/signin_manager_factory.h"
23 #include "chrome/browser/ui/app_list/start_page_observer.h" 24 #include "chrome/browser/ui/app_list/start_page_observer.h"
24 #include "components/search_engines/template_url_service.h" 25 #include "components/search_engines/template_url_service.h"
25 #include "components/search_engines/template_url_service_observer.h" 26 #include "components/search_engines/template_url_service_observer.h"
26 #include "components/signin/core/browser/signin_manager_base.h" 27 #include "components/signin/core/browser/signin_manager_base.h"
27 #include "content/public/browser/notification_observer.h" 28 #include "content/public/browser/notification_observer.h"
28 #include "content/public/browser/notification_registrar.h" 29 #include "content/public/browser/notification_registrar.h"
29 #include "ui/app_list/app_list_view_delegate.h" 30 #include "ui/app_list/app_list_view_delegate.h"
30 31
(...skipping 23 matching lines...) Expand all
54 class ImageSkia; 55 class ImageSkia;
55 } 56 }
56 57
57 #if defined(USE_ASH) 58 #if defined(USE_ASH)
58 class AppSyncUIStateWatcher; 59 class AppSyncUIStateWatcher;
59 #endif 60 #endif
60 61
61 class AppListViewDelegate : public app_list::AppListViewDelegate, 62 class AppListViewDelegate : public app_list::AppListViewDelegate,
62 public app_list::StartPageObserver, 63 public app_list::StartPageObserver,
63 public HotwordClient, 64 public HotwordClient,
64 public ProfileInfoCacheObserver, 65 public ProfileAttributesStorage::Observer,
65 public SigninManagerBase::Observer, 66 public SigninManagerBase::Observer,
66 public SigninManagerFactory::Observer, 67 public SigninManagerFactory::Observer,
67 public content::NotificationObserver, 68 public content::NotificationObserver,
68 public TemplateURLServiceObserver { 69 public TemplateURLServiceObserver {
69 public: 70 public:
70 // Constructs Chrome's AppListViewDelegate with a NULL Profile. 71 // Constructs Chrome's AppListViewDelegate with a NULL Profile.
71 // Does not take ownership of |controller|. TODO(tapted): It should. 72 // Does not take ownership of |controller|. TODO(tapted): It should.
72 explicit AppListViewDelegate(AppListControllerDelegate* controller); 73 explicit AppListViewDelegate(AppListControllerDelegate* controller);
73 ~AppListViewDelegate() override; 74 ~AppListViewDelegate() override;
74 75
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 void SigninManagerShutdown(SigninManagerBase* manager) override; 152 void SigninManagerShutdown(SigninManagerBase* manager) override;
152 153
153 // Overridden from SigninManagerBase::Observer: 154 // Overridden from SigninManagerBase::Observer:
154 void GoogleSigninFailed(const GoogleServiceAuthError& error) override; 155 void GoogleSigninFailed(const GoogleServiceAuthError& error) override;
155 void GoogleSigninSucceeded(const std::string& account_id, 156 void GoogleSigninSucceeded(const std::string& account_id,
156 const std::string& username, 157 const std::string& username,
157 const std::string& password) override; 158 const std::string& password) override;
158 void GoogleSignedOut(const std::string& account_id, 159 void GoogleSignedOut(const std::string& account_id,
159 const std::string& username) override; 160 const std::string& username) override;
160 161
161 // Overridden from ProfileInfoCacheObserver: 162 // Overridden from ProfileAttributesStorage::Observer:
162 void OnProfileAdded(const base::FilePath& profile_path) override; 163 void OnProfileAdded(const base::FilePath& profile_path) override;
163 void OnProfileWasRemoved(const base::FilePath& profile_path, 164 void OnProfileWasRemoved(const base::FilePath& profile_path,
164 const base::string16& profile_name) override; 165 const base::string16& profile_name) override;
165 void OnProfileNameChanged(const base::FilePath& profile_path, 166 void OnProfileNameChanged(const base::FilePath& profile_path,
166 const base::string16& old_profile_name) override; 167 const base::string16& old_profile_name) override;
167 168
168 // Overridden from content::NotificationObserver: 169 // Overridden from content::NotificationObserver:
169 void Observe(int type, 170 void Observe(int type,
170 const content::NotificationSource& source, 171 const content::NotificationSource& source,
171 const content::NotificationDetails& details) override; 172 const content::NotificationDetails& details) override;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // Window contents of additional custom launcher pages. 211 // Window contents of additional custom launcher pages.
211 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_; 212 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_;
212 213
213 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages. 214 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages.
214 content::NotificationRegistrar registrar_; 215 content::NotificationRegistrar registrar_;
215 216
216 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); 217 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate);
217 }; 218 };
218 219
219 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 220 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698