Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: chrome/browser/android/webapk/chrome_webapk_host.h

Issue 2675803004: Fall back to shortcut A2HS when Phonesky is out of date or unavailable. (Closed)
Patch Set: pkotwicz@'s comments. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/webapk/chrome_webapk_host.h
diff --git a/chrome/browser/android/webapk/chrome_webapk_host.h b/chrome/browser/android/webapk/chrome_webapk_host.h
index dc84ea17f89f5962f4a7660446398e731274a249..c8821e138dbadc76bb8ec115f5b9c305fc252425 100644
--- a/chrome/browser/android/webapk/chrome_webapk_host.h
+++ b/chrome/browser/android/webapk/chrome_webapk_host.h
@@ -7,18 +7,29 @@
#include <jni.h>
+#include "base/callback.h"
#include "base/macros.h"
// ChromeWebApkHost is the C++ counterpart of org.chromium.chrome.browser's
// ChromeWebApkHost in Java.
class ChromeWebApkHost {
public:
+ using CanUseGooglePlayInstallApiCallback = base::Callback<void(bool)>;
+
// Registers JNI hooks.
static bool Register(JNIEnv* env);
// Returns whether the "enalbe-webapk" is turned on.
static bool AreWebApkEnabled();
+ // Returns whether the Google Play Install is allowed.
+ static bool CanUseGooglePlayToInstallWebApk();
+
+ // Checks whether Google Play Install API is available. The callback can be
+ // called synchronously.
+ static void CanUseGooglePlayInstallApi(
+ const CanUseGooglePlayInstallApiCallback& Callback);
+
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeWebApkHost);
};

Powered by Google App Engine
This is Rietveld 408576698