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

Side by Side Diff: chrome/browser/android/webapk/webapk_installer.h

Issue 2515293004: Chrome talks to Play to install WebAPKs. (Closed)
Patch Set: Make GooglePlayWebApkInstallDelegate as a singleton. Created 4 years 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_WEBAPK_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_
6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_ 6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const base::android::ScopedJavaLocalRef<jstring>& java_file_path, 98 const base::android::ScopedJavaLocalRef<jstring>& java_file_path,
99 const base::android::ScopedJavaLocalRef<jstring>& java_package_name); 99 const base::android::ScopedJavaLocalRef<jstring>& java_package_name);
100 100
101 // Starts update using the downloaded WebAPK. Returns whether the updating 101 // Starts update using the downloaded WebAPK. Returns whether the updating
102 // could be started. The updating may still fail if true is returned. 102 // could be started. The updating may still fail if true is returned.
103 // |file_path| is the file path that the WebAPK was downloaded to. 103 // |file_path| is the file path that the WebAPK was downloaded to.
104 virtual bool StartUpdateUsingDownloadedWebApk( 104 virtual bool StartUpdateUsingDownloadedWebApk(
105 JNIEnv* env, 105 JNIEnv* env,
106 const base::android::ScopedJavaLocalRef<jstring>& java_file_path); 106 const base::android::ScopedJavaLocalRef<jstring>& java_file_path);
107 107
108 // Returns whether the Google Play install delegate is available.
109 // Note: it is possible that this delegate is null even when installing
110 // WebAPKs using Google Play is enabled.
111 virtual bool HasGooglePlayWebApkInstallDelegate();
112
113 // Called when the package name of the WebAPK is available and the install
114 // or update request is handled by Google Play.
115 virtual bool InstallOrUpdateWebApkFromGooglePlay(
116 const std::string& package_name,
117 int version,
118 const std::string& token);
119
108 // Called when the request to install the WebAPK is sent to Google Play. 120 // Called when the request to install the WebAPK is sent to Google Play.
109 void OnSuccess(); 121 void OnSuccess();
110 122
111 private: 123 private:
112 enum TaskType { 124 enum TaskType {
113 UNDEFINED, 125 UNDEFINED,
114 INSTALL, 126 INSTALL,
115 UPDATE, 127 UPDATE,
116 }; 128 };
117 129
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // Points to the Java Object. 248 // Points to the Java Object.
237 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 249 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
238 250
239 // Used to get |weak_ptr_|. 251 // Used to get |weak_ptr_|.
240 base::WeakPtrFactory<WebApkInstaller> weak_ptr_factory_; 252 base::WeakPtrFactory<WebApkInstaller> weak_ptr_factory_;
241 253
242 DISALLOW_COPY_AND_ASSIGN(WebApkInstaller); 254 DISALLOW_COPY_AND_ASSIGN(WebApkInstaller);
243 }; 255 };
244 256
245 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_ 257 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/webapk/webapk.proto ('k') | chrome/browser/android/webapk/webapk_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698