| 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 customize the webstore data request |
| 95 // (eg, add post data) before sending. The default implementation starts |
| 96 // the request; subclasses overriding this are responsible for calling Start |
| 97 // on the |fetcher| themselves once they are ready for it. |
| 98 virtual void OnBeforeWebstoreDataRequest(WebstoreDataFetcher* fetcher); |
| 99 |
| 94 // Called at certain check points of the workflow to decide whether it makes | 100 // 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 | 101 // sense to proceed with installation. A requestor can be a website that |
| 96 // initiated an inline installation, or a command line option. | 102 // initiated an inline installation, or a command line option. |
| 97 virtual bool CheckRequestorAlive() const = 0; | 103 virtual bool CheckRequestorAlive() const = 0; |
| 98 | 104 |
| 99 // Requestor's URL, if any. Should be an empty GURL if URL is meaningless | 105 // Requestor's URL, if any. Should be an empty GURL if URL is meaningless |
| 100 // (e.g. for a command line option). | 106 // (e.g. for a command line option). |
| 101 virtual const GURL& GetRequestorURL() const = 0; | 107 virtual const GURL& GetRequestorURL() const = 0; |
| 102 | 108 |
| 103 // Should a new tab be opened after installation to show the newly installed | 109 // 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 | 248 // Created by ShowInstallUI() when a prompt is shown (if |
| 243 // the implementor returns a non-NULL in CreateInstallPrompt()). | 249 // the implementor returns a non-NULL in CreateInstallPrompt()). |
| 244 scoped_refptr<Extension> localized_extension_for_display_; | 250 scoped_refptr<Extension> localized_extension_for_display_; |
| 245 | 251 |
| 246 DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreStandaloneInstaller); | 252 DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreStandaloneInstaller); |
| 247 }; | 253 }; |
| 248 | 254 |
| 249 } // namespace extensions | 255 } // namespace extensions |
| 250 | 256 |
| 251 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_STANDALONE_INSTALLER_H_ | 257 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_STANDALONE_INSTALLER_H_ |
| OLD | NEW |