summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extensions_service.h
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-07 00:12:29 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-07 00:12:29 +0000
commit4814b51fe8210920ec1ebdde20c8deb9e65a1ff9 (patch)
tree1849897669aa067acc1751bfd16941872aacd855 /chrome/browser/extensions/extensions_service.h
parentcb99b6afc24241e7e42e7e51ab1c51472ce9b43c (diff)
downloadchromium_src-4814b51fe8210920ec1ebdde20c8deb9e65a1ff9.zip
chromium_src-4814b51fe8210920ec1ebdde20c8deb9e65a1ff9.tar.gz
chromium_src-4814b51fe8210920ec1ebdde20c8deb9e65a1ff9.tar.bz2
Make the inspector for the background page stay open when
reloading an extension. BUG=25287 TEST=Load an extension that has a background page and reload it. Inspector should stay open and continue working. Review URL: http://codereview.chromium.org/371040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extensions_service.h')
-rw-r--r--chrome/browser/extensions/extensions_service.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
index a73263d..60b17c3 100644
--- a/chrome/browser/extensions/extensions_service.h
+++ b/chrome/browser/extensions/extensions_service.h
@@ -22,6 +22,8 @@
#include "chrome/browser/extensions/external_extension_provider.h"
#include "chrome/browser/extensions/sandboxed_extension_unpacker.h"
#include "chrome/browser/privacy_blacklist/blacklist_manager.h"
+#include "chrome/common/notification_observer.h"
+#include "chrome/common/notification_registrar.h"
#include "chrome/common/extensions/extension.h"
class Browser;
@@ -51,11 +53,11 @@ class ExtensionUpdateService {
// Manages installed and running Chromium extensions.
class ExtensionsService
- : public ExtensionUpdateService,
+ : public base::RefCountedThreadSafe<ExtensionsService>,
public BlacklistPathProvider,
- public base::RefCountedThreadSafe<ExtensionsService> {
+ public ExtensionUpdateService,
+ public NotificationObserver {
public:
-
// The name of the directory inside the profile where extensions are
// installed to.
static const char* kInstallDirectoryName;
@@ -226,6 +228,11 @@ class ExtensionsService
virtual std::vector<FilePath> GetPersistentBlacklistPaths();
virtual std::vector<FilePath> GetTransientBlacklistPaths();
+ // NotificationObserver
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
private:
friend class base::RefCountedThreadSafe<ExtensionsService>;
@@ -279,6 +286,13 @@ class ExtensionsService
// Our extension updater, if updates are turned on.
scoped_refptr<ExtensionUpdater> updater_;
+ // Map of inspector cookies that are detached, waiting for an extension to be
+ // reloaded.
+ typedef std::map<std::string, int> OrphanedDevTools;
+ OrphanedDevTools orphaned_dev_tools_;
+
+ NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionsService);
};