| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ANDROID_WEBAPK_CHROME_WEBAPK_HOST_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPK_CHROME_WEBAPK_HOST_H_ |
| 6 #define CHROME_BROWSER_ANDROID_WEBAPK_CHROME_WEBAPK_HOST_H_ | 6 #define CHROME_BROWSER_ANDROID_WEBAPK_CHROME_WEBAPK_HOST_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 | 11 |
| 12 // This enum is used to back a UMA histogram, and must be treated as | 12 // This enum is used to back a UMA histogram, and must be treated as |
| 13 // append-only. | 13 // append-only. |
| 14 // A Java counterpart will be generated for this enum. | 14 // A Java counterpart will be generated for this enum. |
| 15 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser | 15 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser |
| 16 enum class GooglePlayInstallState { | 16 enum class GooglePlayInstallState { |
| 17 SUPPORTED = 0, | 17 SUPPORTED = 0, |
| 18 DISABLED_OTHER = 1, | 18 DISABLED_OTHER = 1, |
| 19 NO_PLAY_SERVICES = 2, | 19 NO_PLAY_SERVICES = 2, |
| 20 DISABLED_BY_VARIATIONS = 3, | 20 // Deprecated: DISABLED_BY_VARIATIONS = 3, |
| 21 DISABLED_BY_PLAY = 4, | 21 DISABLED_BY_PLAY = 4, |
| 22 MAX = 5 | 22 MAX = 5 |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 // ChromeWebApkHost is the C++ counterpart of org.chromium.chrome.browser's | 25 // ChromeWebApkHost is the C++ counterpart of org.chromium.chrome.browser's |
| 26 // ChromeWebApkHost in Java. | 26 // ChromeWebApkHost in Java. |
| 27 class ChromeWebApkHost { | 27 class ChromeWebApkHost { |
| 28 public: | 28 public: |
| 29 // Registers JNI hooks. | 29 // Registers JNI hooks. |
| 30 static bool Register(JNIEnv* env); | 30 static bool Register(JNIEnv* env); |
| 31 | 31 |
| 32 // Returns whether installing WebApk is possible either from "unknown sources" | 32 // Returns whether installing WebApk is possible either from "unknown sources" |
| 33 // or Google Play. | 33 // or Google Play. |
| 34 static bool CanInstallWebApk(); | 34 static bool CanInstallWebApk(); |
| 35 | 35 |
| 36 // Returns the state of installing a WebAPK from Google Play. | 36 // Returns the state of installing a WebAPK from Google Play. |
| 37 static GooglePlayInstallState GetGooglePlayInstallState(); | 37 static GooglePlayInstallState GetGooglePlayInstallState(); |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeWebApkHost); | 40 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeWebApkHost); |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 #endif // CHROME_BROWSER_ANDROID_WEBAPK_CHROME_WEBAPK_HOST_H_ | 43 #endif // CHROME_BROWSER_ANDROID_WEBAPK_CHROME_WEBAPK_HOST_H_ |
| OLD | NEW |