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_CRX_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void InstallCrx(const base::FilePath& source_file); | 101 void InstallCrx(const base::FilePath& source_file); |
102 | 102 |
103 // Convert the specified user script into an extension and install it. | 103 // Convert the specified user script into an extension and install it. |
104 void InstallUserScript(const base::FilePath& source_file, | 104 void InstallUserScript(const base::FilePath& source_file, |
105 const GURL& download_url); | 105 const GURL& download_url); |
106 | 106 |
107 // Convert the specified web app into an extension and install it. | 107 // Convert the specified web app into an extension and install it. |
108 void InstallWebApp(const WebApplicationInfo& web_app); | 108 void InstallWebApp(const WebApplicationInfo& web_app); |
109 | 109 |
110 // Overridden from ExtensionInstallPrompt::Delegate: | 110 // Overridden from ExtensionInstallPrompt::Delegate: |
111 virtual void InstallUIProceed() OVERRIDE; | 111 virtual void InstallUIProceed() override; |
112 virtual void InstallUIAbort(bool user_initiated) OVERRIDE; | 112 virtual void InstallUIAbort(bool user_initiated) override; |
113 | 113 |
114 int creation_flags() const { return creation_flags_; } | 114 int creation_flags() const { return creation_flags_; } |
115 void set_creation_flags(int val) { creation_flags_ = val; } | 115 void set_creation_flags(int val) { creation_flags_ = val; } |
116 | 116 |
117 const base::FilePath& source_file() const { return source_file_; } | 117 const base::FilePath& source_file() const { return source_file_; } |
118 | 118 |
119 Manifest::Location install_source() const { | 119 Manifest::Location install_source() const { |
120 return install_source_; | 120 return install_source_; |
121 } | 121 } |
122 void set_install_source(Manifest::Location source) { | 122 void set_install_source(Manifest::Location source) { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 void ConvertUserScriptOnFileThread(); | 215 void ConvertUserScriptOnFileThread(); |
216 | 216 |
217 // Converts the source web app to an extension. | 217 // Converts the source web app to an extension. |
218 void ConvertWebAppOnFileThread(const WebApplicationInfo& web_app); | 218 void ConvertWebAppOnFileThread(const WebApplicationInfo& web_app); |
219 | 219 |
220 // Called after OnUnpackSuccess as a last check to see whether the install | 220 // Called after OnUnpackSuccess as a last check to see whether the install |
221 // should complete. | 221 // should complete. |
222 CrxInstallerError AllowInstall(const Extension* extension); | 222 CrxInstallerError AllowInstall(const Extension* extension); |
223 | 223 |
224 // SandboxedUnpackerClient | 224 // SandboxedUnpackerClient |
225 virtual void OnUnpackFailure(const base::string16& error_message) OVERRIDE; | 225 virtual void OnUnpackFailure(const base::string16& error_message) override; |
226 virtual void OnUnpackSuccess(const base::FilePath& temp_dir, | 226 virtual void OnUnpackSuccess(const base::FilePath& temp_dir, |
227 const base::FilePath& extension_dir, | 227 const base::FilePath& extension_dir, |
228 const base::DictionaryValue* original_manifest, | 228 const base::DictionaryValue* original_manifest, |
229 const Extension* extension, | 229 const Extension* extension, |
230 const SkBitmap& install_icon) OVERRIDE; | 230 const SkBitmap& install_icon) override; |
231 | 231 |
232 // Called on the UI thread to start the requirements, policy and blacklist | 232 // Called on the UI thread to start the requirements, policy and blacklist |
233 // checks on the extension. | 233 // checks on the extension. |
234 void CheckInstall(); | 234 void CheckInstall(); |
235 | 235 |
236 // Runs on the UI thread. Callback from ExtensionInstallChecker. | 236 // Runs on the UI thread. Callback from ExtensionInstallChecker. |
237 void OnInstallChecksComplete(int failed_checks); | 237 void OnInstallChecksComplete(int failed_checks); |
238 | 238 |
239 // Runs on the UI thread. Callback from Blacklist. | 239 // Runs on the UI thread. Callback from Blacklist. |
240 void OnBlacklistChecked( | 240 void OnBlacklistChecked( |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 | 420 |
421 // Performs requirements, policy and blacklist checks on the extension. | 421 // Performs requirements, policy and blacklist checks on the extension. |
422 ExtensionInstallChecker install_checker_; | 422 ExtensionInstallChecker install_checker_; |
423 | 423 |
424 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); | 424 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); |
425 }; | 425 }; |
426 | 426 |
427 } // namespace extensions | 427 } // namespace extensions |
428 | 428 |
429 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 429 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
OLD | NEW |