summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extensions_service.h
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-29 22:24:31 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-29 22:24:31 +0000
commitc64631651a4267994dbdd336243e06b64e4e7a5f (patch)
tree23700eae496a6cf3cda0beea3742f12656c8cd4b /chrome/browser/extensions/extensions_service.h
parent45671618a6690a8501f01905a4ed6d19cfcdc0b1 (diff)
downloadchromium_src-c64631651a4267994dbdd336243e06b64e4e7a5f.zip
chromium_src-c64631651a4267994dbdd336243e06b64e4e7a5f.tar.gz
chromium_src-c64631651a4267994dbdd336243e06b64e4e7a5f.tar.bz2
Refactor ExtensionView to support a UI-less extension instance.
- Introduce ExtensionHost, which is the guy that talks to the RenderViewHost. - ExtensionView holds an ExtensionHost, and also renders its contents in an HWND. - Added code to load a page optionally specified in the manifest as a background process whenever it exists. Review URL: http://codereview.chromium.org/92043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14902 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extensions_service.h')
-rw-r--r--chrome/browser/extensions/extensions_service.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
index 2d075bc..d876f34 100644
--- a/chrome/browser/extensions/extensions_service.h
+++ b/chrome/browser/extensions/extensions_service.h
@@ -7,6 +7,7 @@
#include <string>
#include <vector>
+#include <list>
#include "base/file_path.h"
#include "base/message_loop.h"
@@ -17,6 +18,7 @@
class Browser;
class BrowsingInstance;
class Extension;
+class ExtensionHost;
class ExtensionView;
class ExtensionsServiceBackend;
class GURL;
@@ -82,6 +84,10 @@ class ExtensionsService : public ExtensionsServiceFrontendInterface {
const GURL& url,
Browser* browser);
+ // Creates a new UI-less extension instance. Like CreateView, but not
+ // displayed anywhere.
+ void CreateBackgroundHost(Extension* extension, const GURL& url);
+
// Returns the SiteInstance that the given URL belongs to.
SiteInstance* GetSiteInstanceForURL(const GURL& url);
@@ -112,6 +118,10 @@ class ExtensionsService : public ExtensionsServiceFrontendInterface {
// controls process grouping.
scoped_refptr<BrowsingInstance> browsing_instance_;
+ // The list of running viewless background extensions.
+ typedef std::list<ExtensionHost*> ExtensionHostList;
+ ExtensionHostList background_hosts_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionsService);
};