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

Unified Diff: chrome/browser/ui/app_list/app_list_view_delegate.h

Issue 559823002: Observe chrome::NOTIFICATION_APP_TERMINATING in Chrome's AppListViewDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment 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 side-by-side diff with in-line comments
Download patch
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 06a7db2009e334f0a9b0f119a5f2d4fbaeef9046..5aa6ba8bf50ffa2f96c932ed99e8736ade5102fd 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.h
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.h
@@ -19,6 +19,8 @@
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/ui/app_list/start_page_observer.h"
#include "components/signin/core/browser/signin_manager_base.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/app_list/app_list_view_delegate.h"
class AppListControllerDelegate;
@@ -50,7 +52,8 @@ class AppListViewDelegate : public app_list::AppListViewDelegate,
public HotwordClient,
public ProfileInfoCacheObserver,
public SigninManagerBase::Observer,
- public SigninManagerFactory::Observer {
+ public SigninManagerFactory::Observer,
+ public content::NotificationObserver {
public:
// Constructs Chrome's AppListViewDelegate, initially for |profile|.
// Does not take ownership of |controller|. TODO(tapted): It should.
@@ -143,6 +146,11 @@ class AppListViewDelegate : public app_list::AppListViewDelegate,
const base::FilePath& profile_path,
const base::string16& old_profile_name) OVERRIDE;
+ // Overridden from content::NotificationObserver:
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
// Unowned pointer to the controller.
AppListControllerDelegate* controller_;
// Unowned pointer to the associated profile. May change if SetProfileByPath
@@ -173,6 +181,9 @@ class AppListViewDelegate : public app_list::AppListViewDelegate,
// Window contents of additional custom launcher pages.
ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_;
+ // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages.
+ content::NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate);
};
« no previous file with comments | « chrome/browser/signin/signin_manager_factory.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