From 3cf4f0999332e4406b29ec19401fdde45a377049 Mon Sep 17 00:00:00 2001 From: "erikkay@google.com" Date: Tue, 3 Feb 2009 23:00:30 +0000 Subject: 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 --- chrome/browser/extensions/extensions_service.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'chrome/browser/extensions/extensions_service.h') 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 frontend); -- cgit v1.1