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

Side by Side 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 unified diff | Download patch
OLDNEW
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/callback.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 12
12 // ChromeWebApkHost is the C++ counterpart of org.chromium.chrome.browser's 13 // ChromeWebApkHost is the C++ counterpart of org.chromium.chrome.browser's
13 // ChromeWebApkHost in Java. 14 // ChromeWebApkHost in Java.
14 class ChromeWebApkHost { 15 class ChromeWebApkHost {
15 public: 16 public:
17 using CanUseGooglePlayInstallApiCallback = base::Callback<void(bool)>;
18
16 // Registers JNI hooks. 19 // Registers JNI hooks.
17 static bool Register(JNIEnv* env); 20 static bool Register(JNIEnv* env);
18 21
19 // Returns whether the "enalbe-webapk" is turned on. 22 // Returns whether the "enalbe-webapk" is turned on.
20 static bool AreWebApkEnabled(); 23 static bool AreWebApkEnabled();
21 24
25 // Returns whether the Google Play Install is allowed.
26 static bool CanUseGooglePlayToInstallWebApk();
27
28 // Checks whether Google Play Install API is available. The callback can be
29 // called synchronously.
30 static void CanUseGooglePlayInstallApi(
31 const CanUseGooglePlayInstallApiCallback& Callback);
32
22 private: 33 private:
23 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeWebApkHost); 34 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeWebApkHost);
24 }; 35 };
25 36
26 #endif // CHROME_BROWSER_ANDROID_WEBAPK_CHROME_WEBAPK_HOST_H_ 37 #endif // CHROME_BROWSER_ANDROID_WEBAPK_CHROME_WEBAPK_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698