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

Unified Diff: chrome/browser/background/background_contents_service.h

Issue 413563002: Remove DEPRECATED extension notification from background_contents_service.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/background/background_contents_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/background/background_contents_service.h
diff --git a/chrome/browser/background/background_contents_service.h b/chrome/browser/background/background_contents_service.h
index 05f095330c3ddcad3bc528e909baf3b5890a8c29..d9f859de0ea0e5c0a1867f6e92af89f1e3faee3d 100644
--- a/chrome/browser/background/background_contents_service.h
+++ b/chrome/browser/background/background_contents_service.h
@@ -11,11 +11,13 @@
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
+#include "base/scoped_observer.h"
#include "chrome/browser/tab_contents/background_contents.h"
#include "components/keyed_service/core/keyed_service.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/common/window_container_type.h"
+#include "extensions/browser/extension_registry_observer.h"
#include "ui/base/window_open_disposition.h"
#include "url/gurl.h"
@@ -33,6 +35,7 @@ class SessionStorageNamespace;
namespace extensions {
class Extension;
+class ExtensionRegistry;
}
namespace gfx {
@@ -50,6 +53,7 @@ struct BackgroundContentsOpenedDetails;
// BackgroundContents and their parent app, and shutting them down when the
// parent app is unloaded.
class BackgroundContentsService : private content::NotificationObserver,
+ public extensions::ExtensionRegistryObserver,
public BackgroundContents::Delegate,
public KeyedService {
public:
@@ -140,6 +144,19 @@ class BackgroundContentsService : private content::NotificationObserver,
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;
+ virtual void OnExtensionUninstalled(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension,
+ extensions::UninstallReason reason) OVERRIDE;
+
// Restarts a force-installed app/extension after a crash.
void RestartForceInstalledExtensionOnCrash(
const extensions::Extension* extension,
@@ -218,6 +235,10 @@ class BackgroundContentsService : private content::NotificationObserver,
BackgroundContentsMap;
BackgroundContentsMap contents_map_;
+ ScopedObserver<extensions::ExtensionRegistry,
+ extensions::ExtensionRegistryObserver>
+ extension_registry_observer_;
+
DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService);
};
« no previous file with comments | « no previous file | chrome/browser/background/background_contents_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698