| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h" | 11 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h" |
| 12 #include "chrome/browser/extensions/active_install_data.h" | 12 #include "chrome/browser/extensions/active_install_data.h" |
| 13 #include "chrome/browser/extensions/chrome_extension_function_details.h" | 13 #include "chrome/browser/extensions/chrome_extension_function_details.h" |
| 14 #include "chrome/browser/extensions/extension_install_prompt.h" | 14 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 15 #include "chrome/browser/extensions/webstore_install_helper.h" | 15 #include "chrome/browser/extensions/webstore_install_helper.h" |
| 16 #include "chrome/browser/extensions/webstore_installer.h" | 16 #include "chrome/browser/extensions/webstore_installer.h" |
| 17 #include "chrome/common/extensions/api/webstore_private.h" | 17 #include "chrome/common/extensions/api/webstore_private.h" |
| 18 #include "chrome/common/extensions/webstore_install_result.h" | 18 #include "chrome/common/extensions/webstore_install_result.h" |
| 19 #include "extensions/browser/extension_function.h" | 19 #include "extensions/browser/extension_function.h" |
| 20 #include "third_party/skia/include/core/SkBitmap.h" | 20 #include "third_party/skia/include/core/SkBitmap.h" |
| 21 | 21 |
| 22 class GPUFeatureChecker; | 22 namespace content { |
| 23 class GpuFeatureChecker; |
| 24 } |
| 23 | 25 |
| 24 namespace extensions { | 26 namespace extensions { |
| 25 | 27 |
| 26 class Extension; | 28 class Extension; |
| 27 | 29 |
| 28 class WebstorePrivateApi { | 30 class WebstorePrivateApi { |
| 29 public: | 31 public: |
| 30 // Allows you to override the WebstoreInstaller delegate for testing. | 32 // Allows you to override the WebstoreInstaller delegate for testing. |
| 31 static void SetWebstoreInstallerDelegateForTesting( | 33 static void SetWebstoreInstallerDelegateForTesting( |
| 32 WebstoreInstaller::Delegate* delegate); | 34 WebstoreInstaller::Delegate* delegate); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 WebstorePrivateGetWebGLStatusFunction(); | 202 WebstorePrivateGetWebGLStatusFunction(); |
| 201 | 203 |
| 202 private: | 204 private: |
| 203 ~WebstorePrivateGetWebGLStatusFunction() override; | 205 ~WebstorePrivateGetWebGLStatusFunction() override; |
| 204 | 206 |
| 205 // ExtensionFunction: | 207 // ExtensionFunction: |
| 206 ExtensionFunction::ResponseAction Run() override; | 208 ExtensionFunction::ResponseAction Run() override; |
| 207 | 209 |
| 208 void OnFeatureCheck(bool feature_allowed); | 210 void OnFeatureCheck(bool feature_allowed); |
| 209 | 211 |
| 210 scoped_refptr<GPUFeatureChecker> feature_checker_; | 212 scoped_refptr<content::GpuFeatureChecker> feature_checker_; |
| 211 }; | 213 }; |
| 212 | 214 |
| 213 class WebstorePrivateGetIsLauncherEnabledFunction | 215 class WebstorePrivateGetIsLauncherEnabledFunction |
| 214 : public UIThreadExtensionFunction { | 216 : public UIThreadExtensionFunction { |
| 215 public: | 217 public: |
| 216 DECLARE_EXTENSION_FUNCTION("webstorePrivate.getIsLauncherEnabled", | 218 DECLARE_EXTENSION_FUNCTION("webstorePrivate.getIsLauncherEnabled", |
| 217 WEBSTOREPRIVATE_GETISLAUNCHERENABLED) | 219 WEBSTOREPRIVATE_GETISLAUNCHERENABLED) |
| 218 | 220 |
| 219 WebstorePrivateGetIsLauncherEnabledFunction(); | 221 WebstorePrivateGetIsLauncherEnabledFunction(); |
| 220 | 222 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 ExtensionFunction::ResponseAction Run() override; | 300 ExtensionFunction::ResponseAction Run() override; |
| 299 | 301 |
| 300 ExtensionFunction::ResponseValue BuildResponse(bool result); | 302 ExtensionFunction::ResponseValue BuildResponse(bool result); |
| 301 | 303 |
| 302 ChromeExtensionFunctionDetails chrome_details_; | 304 ChromeExtensionFunctionDetails chrome_details_; |
| 303 }; | 305 }; |
| 304 | 306 |
| 305 } // namespace extensions | 307 } // namespace extensions |
| 306 | 308 |
| 307 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H
_ | 309 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H
_ |
| OLD | NEW |