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

Unified Diff: chrome/browser/ui/webui/app_list/start_page_handler.h

Issue 275503003: Remove deprecated extension notification and deprecated extension_service functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comment from xiyuan Created 6 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/app_list/start_page_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/app_list/start_page_handler.h
diff --git a/chrome/browser/ui/webui/app_list/start_page_handler.h b/chrome/browser/ui/webui/app_list/start_page_handler.h
index 1ebff187b6299df3acdf0f7c6cb78bf67dc0c0fc..b6cdf3a4756c0b7ec571524cccdf93d4f04f7cd2 100644
--- a/chrome/browser/ui/webui/app_list/start_page_handler.h
+++ b/chrome/browser/ui/webui/app_list/start_page_handler.h
@@ -8,22 +8,26 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/prefs/pref_change_registrar.h"
+#include "base/scoped_observer.h"
#include "chrome/browser/ui/app_list/recommended_apps_observer.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_ui_message_handler.h"
+#include "extensions/browser/extension_registry_observer.h"
namespace base {
class ListValue;
}
+namespace extensions {
+class ExtensionRegistry;
+}
+
namespace app_list {
class RecommendedApps;
// Handler for the app launcher start page.
class StartPageHandler : public content::WebUIMessageHandler,
- public content::NotificationObserver,
+ public extensions::ExtensionRegistryObserver,
public RecommendedAppsObserver {
public:
StartPageHandler();
@@ -33,10 +37,14 @@ class StartPageHandler : public content::WebUIMessageHandler,
// content::WebUIMessageHandler overrides:
virtual void RegisterMessages() OVERRIDE;
- // Overridden from content::NotificationObserver:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ // extensions::ExtensionRegistryObserver implementation.
+ virtual void OnExtensionLoaded(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension) OVERRIDE;
+ virtual void OnExtensionUnloaded(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension,
+ extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE;
// RecommendedAppsObserver overrdies:
virtual void OnRecommendedAppsChanged() OVERRIDE;
@@ -58,7 +66,10 @@ class StartPageHandler : public content::WebUIMessageHandler,
RecommendedApps* recommended_apps_; // Not owned.
PrefChangeRegistrar pref_change_registrar_;
- content::NotificationRegistrar registrar_;
+
+ ScopedObserver<extensions::ExtensionRegistry,
+ extensions::ExtensionRegistryObserver>
+ extension_registry_observer_;
DISALLOW_COPY_AND_ASSIGN(StartPageHandler);
};
« no previous file with comments | « no previous file | chrome/browser/ui/webui/app_list/start_page_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698