summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extensions_service.h
diff options
context:
space:
mode:
authorerikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 23:00:30 +0000
committererikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 23:00:30 +0000
commit3cf4f0999332e4406b29ec19401fdde45a377049 (patch)
tree1ae1929813a73f6b221ae9e53d09af173cd1d7b9 /chrome/browser/extensions/extensions_service.h
parentf6a9e5f191be83a7d0a867eed5e5754d378101bb (diff)
downloadchromium_src-3cf4f0999332e4406b29ec19401fdde45a377049.zip
chromium_src-3cf4f0999332e4406b29ec19401fdde45a377049.tar.gz
chromium_src-3cf4f0999332e4406b29ec19401fdde45a377049.tar.bz2
Add a command line flag to load a single extension from an arbitrary (non-versioned) directory. This is designed for developers to iterate on extension development without having to go through the install process.
Review URL: http://codereview.chromium.org/20020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9107 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extensions_service.h')
-rw-r--r--chrome/browser/extensions/extensions_service.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
index 3988a5e..0421f4b 100644
--- a/chrome/browser/extensions/extensions_service.h
+++ b/chrome/browser/extensions/extensions_service.h
@@ -27,6 +27,12 @@ class ExtensionsServiceFrontendInterface
// The message loop to invoke the frontend's methods on.
virtual MessageLoop* GetMessageLoop() = 0;
+ // Install the extension file at |extension_path|.
+ virtual void InstallExtension(const FilePath& extension_path) = 0;
+
+ // Load the extension from the directory |extension_path|.
+ virtual void LoadExtension(const FilePath& extension_path) = 0;
+
// Called when loading an extension fails.
virtual void OnExtensionLoadError(const std::string& message) = 0;
@@ -34,9 +40,6 @@ class ExtensionsServiceFrontendInterface
// takes ownership of the list.
virtual void OnExtensionsLoadedFromDirectory(ExtensionList* extensions) = 0;
- // Install the extension file at extension_path.
- virtual void InstallExtension(const FilePath& extension_path) = 0;
-
// Called when installing an extension fails.
virtual void OnExtensionInstallError(const std::string& message) = 0;
@@ -62,9 +65,10 @@ class ExtensionsService : public ExtensionsServiceFrontendInterface {
// ExtensionsServiceFrontendInterface
virtual MessageLoop* GetMessageLoop();
+ virtual void InstallExtension(const FilePath& extension_path);
+ virtual void LoadExtension(const FilePath& extension_path);
virtual void OnExtensionLoadError(const std::string& message);
virtual void OnExtensionsLoadedFromDirectory(ExtensionList* extensions);
- virtual void InstallExtension(const FilePath& extension_path);
virtual void OnExtensionInstallError(const std::string& message);
virtual void OnExtensionInstalled(FilePath path);
@@ -116,6 +120,8 @@ class ExtensionsServiceBackend
// Errors are reported through OnExtensionLoadError(). On completion,
// OnExtensionsLoadedFromDirectory() is called with any successfully loaded
// extensions.
+ // TODO(erikkay): It might be useful to be able to load a packed extension
+ // (presumably into memory) without installing it.
bool LoadSingleExtension(
const FilePath &path,
scoped_refptr<ExtensionsServiceFrontendInterface> frontend);