Chromium Code Reviews| 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 // DEPRECATED | |
|
pkotwicz
2017/03/30 21:55:16
I think that this would be clearer:
// Deprecated
Yaron
2017/03/31 13:50:13
Done.
| |
| 20 DISABLED_BY_VARIATIONS = 3, | 21 DISABLED_BY_VARIATIONS = 3, |
|
Xi Han
2017/03/30 22:14:11
It's better to update the description in histogram
Yaron
2017/03/31 13:50:13
Done.
| |
| 21 DISABLED_BY_PLAY = 4, | 22 DISABLED_BY_PLAY = 4, |
| 22 MAX = 5 | 23 MAX = 5 |
| 23 }; | 24 }; |
| 24 | 25 |
| 25 // ChromeWebApkHost is the C++ counterpart of org.chromium.chrome.browser's | 26 // ChromeWebApkHost is the C++ counterpart of org.chromium.chrome.browser's |
| 26 // ChromeWebApkHost in Java. | 27 // ChromeWebApkHost in Java. |
| 27 class ChromeWebApkHost { | 28 class ChromeWebApkHost { |
| 28 public: | 29 public: |
| 29 // Registers JNI hooks. | 30 // Registers JNI hooks. |
| 30 static bool Register(JNIEnv* env); | 31 static bool Register(JNIEnv* env); |
| 31 | 32 |
| 32 // Returns whether installing WebApk is possible either from "unknown sources" | 33 // Returns whether installing WebApk is possible either from "unknown sources" |
| 33 // or Google Play. | 34 // or Google Play. |
| 34 static bool CanInstallWebApk(); | 35 static bool CanInstallWebApk(); |
| 35 | 36 |
| 36 // Returns the state of installing a WebAPK from Google Play. | 37 // Returns the state of installing a WebAPK from Google Play. |
| 37 static GooglePlayInstallState GetGooglePlayInstallState(); | 38 static GooglePlayInstallState GetGooglePlayInstallState(); |
| 38 | 39 |
| 39 private: | 40 private: |
| 40 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeWebApkHost); | 41 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeWebApkHost); |
| 41 }; | 42 }; |
| 42 | 43 |
| 43 #endif // CHROME_BROWSER_ANDROID_WEBAPK_CHROME_WEBAPK_HOST_H_ | 44 #endif // CHROME_BROWSER_ANDROID_WEBAPK_CHROME_WEBAPK_HOST_H_ |
| OLD | NEW |