OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... | |
32 static scoped_refptr<UnpackedInstaller> Create( | 32 static scoped_refptr<UnpackedInstaller> Create( |
33 ExtensionService* extension_service); | 33 ExtensionService* extension_service); |
34 | 34 |
35 // Loads the extension from the directory |extension_path|, which is | 35 // Loads the extension from the directory |extension_path|, which is |
36 // the top directory of a specific extension where its manifest file lives. | 36 // the top directory of a specific extension where its manifest file lives. |
37 // Errors are reported through ExtensionErrorReporter. On success, | 37 // Errors are reported through ExtensionErrorReporter. On success, |
38 // ExtensionService::AddExtension() is called. | 38 // ExtensionService::AddExtension() is called. |
39 void Load(const base::FilePath& extension_path); | 39 void Load(const base::FilePath& extension_path); |
40 | 40 |
41 // Loads the extension from the directory |extension_path|; | 41 // Loads the extension from the directory |extension_path|; |
42 // for use with command line switch --load-extension=path. | 42 // for use with command line switch --load-extension=path or |
43 // --load-and-launch-app. | |
43 // This is equivalent to Load, except that it runs synchronously and | 44 // This is equivalent to Load, except that it runs synchronously and |
44 // optionally launches the extension once it's loaded. | 45 // optionally launches the extension once it's loaded. |
koz (OOO until 15th September)
2013/05/30 00:22:22
This function no longer optionally launches the ex
benwells
2013/05/30 01:47:43
Done.
| |
45 void LoadFromCommandLine(const base::FilePath& extension_path, | 46 // The return value indicates whether the installation has begun successfully. |
46 bool launch_on_load); | 47 // The id of the extension being loaded is returned in |extension_id|. |
48 bool LoadFromCommandLine(const base::FilePath& extension_path, | |
49 std::string* extension_id); | |
47 | 50 |
48 // Allows prompting for plugins to be disabled; intended for testing only. | 51 // Allows prompting for plugins to be disabled; intended for testing only. |
49 bool prompt_for_plugins() { return prompt_for_plugins_; } | 52 bool prompt_for_plugins() { return prompt_for_plugins_; } |
50 void set_prompt_for_plugins(bool val) { prompt_for_plugins_ = val; } | 53 void set_prompt_for_plugins(bool val) { prompt_for_plugins_ = val; } |
51 | 54 |
52 // Allows overriding of whether modern manifest versions are required; | 55 // Allows overriding of whether modern manifest versions are required; |
53 // intended for testing. | 56 // intended for testing. |
54 bool require_modern_manifest_version() const { | 57 bool require_modern_manifest_version() const { |
55 return require_modern_manifest_version_; | 58 return require_modern_manifest_version_; |
56 } | 59 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 base::FilePath extension_path_; | 107 base::FilePath extension_path_; |
105 | 108 |
106 // If true and the extension contains plugins, we prompt the user before | 109 // If true and the extension contains plugins, we prompt the user before |
107 // loading. | 110 // loading. |
108 bool prompt_for_plugins_; | 111 bool prompt_for_plugins_; |
109 | 112 |
110 // Whether to require the extension installed to have a modern manifest | 113 // Whether to require the extension installed to have a modern manifest |
111 // version. | 114 // version. |
112 bool require_modern_manifest_version_; | 115 bool require_modern_manifest_version_; |
113 | 116 |
114 // Whether to launch the extension once it's loaded. | |
115 bool launch_on_load_; | |
116 | |
117 // Gives access to common methods and data of an extension installer. | 117 // Gives access to common methods and data of an extension installer. |
118 ExtensionInstaller installer_; | 118 ExtensionInstaller installer_; |
119 | 119 |
120 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); | 120 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); |
121 }; | 121 }; |
122 | 122 |
123 } // namespace extensions | 123 } // namespace extensions |
124 | 124 |
125 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 125 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
OLD | NEW |