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

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

Issue 508813002: Move ownership of the AppListViewDelegate into the AppListService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 6 years, 3 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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #endif 48 #endif
49 49
50 class AppListViewDelegate : public app_list::AppListViewDelegate, 50 class AppListViewDelegate : public app_list::AppListViewDelegate,
51 public app_list::StartPageObserver, 51 public app_list::StartPageObserver,
52 public HotwordClient, 52 public HotwordClient,
53 public ProfileInfoCacheObserver, 53 public ProfileInfoCacheObserver,
54 public SigninManagerBase::Observer, 54 public SigninManagerBase::Observer,
55 public SigninManagerFactory::Observer, 55 public SigninManagerFactory::Observer,
56 public content::NotificationObserver { 56 public content::NotificationObserver {
57 public: 57 public:
58 // Constructs Chrome's AppListViewDelegate, initially for |profile|. 58 // Constructs Chrome's AppListViewDelegate with a NULL Profile.
59 // Does not take ownership of |controller|. TODO(tapted): It should. 59 // Does not take ownership of |controller|. TODO(tapted): It should.
60 AppListViewDelegate(Profile* profile, 60 explicit AppListViewDelegate(AppListControllerDelegate* controller);
61 AppListControllerDelegate* controller);
62 virtual ~AppListViewDelegate(); 61 virtual ~AppListViewDelegate();
63 62
64 private:
65 // Configure the AppList for the given |profile|. 63 // Configure the AppList for the given |profile|.
66 void SetProfile(Profile* profile); 64 void SetProfile(Profile* profile);
65 Profile* profile() { return profile_; }
67 66
67 private:
68 // Updates the speech webview and start page for the current |profile_|. 68 // Updates the speech webview and start page for the current |profile_|.
69 void SetUpSearchUI(); 69 void SetUpSearchUI();
70 70
71 // Updates the app list's ProfileMenuItems for the current |profile_|. 71 // Updates the app list's ProfileMenuItems for the current |profile_|.
72 void SetUpProfileSwitcher(); 72 void SetUpProfileSwitcher();
73 73
74 // Updates the app list's custom launcher pages for the current |profile_|. 74 // Updates the app list's custom launcher pages for the current |profile_|.
75 void SetUpCustomLauncherPages(); 75 void SetUpCustomLauncherPages();
76 76
77 // Overridden from app_list::AppListViewDelegate: 77 // Overridden from app_list::AppListViewDelegate:
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // Window contents of additional custom launcher pages. 181 // Window contents of additional custom launcher pages.
182 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_; 182 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_;
183 183
184 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages. 184 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages.
185 content::NotificationRegistrar registrar_; 185 content::NotificationRegistrar registrar_;
186 186
187 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); 187 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate);
188 }; 188 };
189 189
190 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 190 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_shower_views_unittest.cc ('k') | 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