| 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_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/extensions/bundle_installer.h" | 10 #include "chrome/browser/extensions/bundle_installer.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 SkBitmap icon_; | 142 SkBitmap icon_; |
| 143 | 143 |
| 144 // A dummy Extension object we create for the purposes of using | 144 // A dummy Extension object we create for the purposes of using |
| 145 // ExtensionInstallPrompt to prompt for confirmation of the install. | 145 // ExtensionInstallPrompt to prompt for confirmation of the install. |
| 146 scoped_refptr<extensions::Extension> dummy_extension_; | 146 scoped_refptr<extensions::Extension> dummy_extension_; |
| 147 | 147 |
| 148 // The class that displays the install prompt. | 148 // The class that displays the install prompt. |
| 149 scoped_ptr<ExtensionInstallPrompt> install_prompt_; | 149 scoped_ptr<ExtensionInstallPrompt> install_prompt_; |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 class CompleteInstallFunction : public SyncExtensionFunction { | 152 class CompleteInstallFunction |
| 153 : public AsyncExtensionFunction, |
| 154 public WebstoreInstaller::Delegate { |
| 153 public: | 155 public: |
| 154 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.completeInstall"); | 156 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.completeInstall"); |
| 155 | 157 |
| 158 // WebstoreInstaller::Delegate: |
| 159 virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE; |
| 160 virtual void OnExtensionInstallFailure(const std::string& id, |
| 161 const std::string& error) OVERRIDE; |
| 156 protected: | 162 protected: |
| 157 virtual ~CompleteInstallFunction() {} | 163 virtual ~CompleteInstallFunction() {} |
| 158 | 164 |
| 159 // ExtensionFunction: | 165 // ExtensionFunction: |
| 160 virtual bool RunImpl() OVERRIDE; | 166 virtual bool RunImpl() OVERRIDE; |
| 161 }; | 167 }; |
| 162 | 168 |
| 163 class GetBrowserLoginFunction : public SyncExtensionFunction { | 169 class GetBrowserLoginFunction : public SyncExtensionFunction { |
| 164 public: | 170 public: |
| 165 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getBrowserLogin"); | 171 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getBrowserLogin"); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 215 |
| 210 private: | 216 private: |
| 211 void CreateResult(bool webgl_allowed); | 217 void CreateResult(bool webgl_allowed); |
| 212 | 218 |
| 213 scoped_refptr<GPUFeatureChecker> feature_checker_; | 219 scoped_refptr<GPUFeatureChecker> feature_checker_; |
| 214 }; | 220 }; |
| 215 | 221 |
| 216 } // namespace extensions | 222 } // namespace extensions |
| 217 | 223 |
| 218 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H
_ | 224 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H
_ |
| OLD | NEW |