| 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_WEBSTORE_STANDALONE_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_STANDALONE_INSTALLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_STANDALONE_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_STANDALONE_INSTALLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // is safe to call from OnManifestParsed() onwards. The manifest may be | 84 // is safe to call from OnManifestParsed() onwards. The manifest may be |
| 85 // invalid, thus the caller must check that the return value is not NULL. | 85 // invalid, thus the caller must check that the return value is not NULL. |
| 86 scoped_refptr<const Extension> GetLocalizedExtensionForDisplay(); | 86 scoped_refptr<const Extension> GetLocalizedExtensionForDisplay(); |
| 87 | 87 |
| 88 // Template Method's hooks to be implemented by subclasses. | 88 // Template Method's hooks to be implemented by subclasses. |
| 89 | 89 |
| 90 // Called when this install is about to be registered with the InstallTracker. | 90 // Called when this install is about to be registered with the InstallTracker. |
| 91 // Allows subclasses to set properties of the install data. | 91 // Allows subclasses to set properties of the install data. |
| 92 virtual void InitInstallData(ActiveInstallData* install_data) const; | 92 virtual void InitInstallData(ActiveInstallData* install_data) const; |
| 93 | 93 |
| 94 // Gives subclasses an opportunity to provide extra post data in the form of |
| 95 // serialized JSON to the webstore data request before sending. The default |
| 96 // implementation returns an empty string. |
| 97 virtual std::string GetJsonPostData(); |
| 98 |
| 94 // Called at certain check points of the workflow to decide whether it makes | 99 // Called at certain check points of the workflow to decide whether it makes |
| 95 // sense to proceed with installation. A requestor can be a website that | 100 // sense to proceed with installation. A requestor can be a website that |
| 96 // initiated an inline installation, or a command line option. | 101 // initiated an inline installation, or a command line option. |
| 97 virtual bool CheckRequestorAlive() const = 0; | 102 virtual bool CheckRequestorAlive() const = 0; |
| 98 | 103 |
| 99 // Requestor's URL, if any. Should be an empty GURL if URL is meaningless | 104 // Requestor's URL, if any. Should be an empty GURL if URL is meaningless |
| 100 // (e.g. for a command line option). | 105 // (e.g. for a command line option). |
| 101 virtual const GURL& GetRequestorURL() const = 0; | 106 virtual const GURL& GetRequestorURL() const = 0; |
| 102 | 107 |
| 103 // Should a new tab be opened after installation to show the newly installed | 108 // Should a new tab be opened after installation to show the newly installed |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 // Created by ShowInstallUI() when a prompt is shown (if | 247 // Created by ShowInstallUI() when a prompt is shown (if |
| 243 // the implementor returns a non-NULL in CreateInstallPrompt()). | 248 // the implementor returns a non-NULL in CreateInstallPrompt()). |
| 244 scoped_refptr<Extension> localized_extension_for_display_; | 249 scoped_refptr<Extension> localized_extension_for_display_; |
| 245 | 250 |
| 246 DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreStandaloneInstaller); | 251 DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreStandaloneInstaller); |
| 247 }; | 252 }; |
| 248 | 253 |
| 249 } // namespace extensions | 254 } // namespace extensions |
| 250 | 255 |
| 251 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_STANDALONE_INSTALLER_H_ | 256 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_STANDALONE_INSTALLER_H_ |
| OLD | NEW |