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

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

Issue 2746723002: [WebAPK] Refactor "unsigned sources" installation path (Closed)
Patch Set: Merge branch 'master' into start Created 3 years, 9 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_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 <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 bool is_manifest_stale); 103 bool is_manifest_stale);
104 104
105 // Registers JNI hooks. 105 // Registers JNI hooks.
106 static bool Register(JNIEnv* env); 106 static bool Register(JNIEnv* env);
107 107
108 protected: 108 protected:
109 WebApkInstaller(content::BrowserContext* browser_context, 109 WebApkInstaller(content::BrowserContext* browser_context,
110 const ShortcutInfo& shortcut_info, 110 const ShortcutInfo& shortcut_info,
111 const SkBitmap& shortcut_icon); 111 const SkBitmap& shortcut_icon);
112 112
113 // Starts installation of the downloaded WebAPK. Returns whether the install 113 // Starts installion of the downloaded WebAPK.
114 // could be started. The installation may still fail if true is returned.
115 // |file_path| is the file path that the WebAPK was downloaded to. 114 // |file_path| is the file path that the WebAPK was downloaded to.
116 // |package_name| is the package name that the WebAPK should be installed at. 115 // |package_name| is the package name of the WebAPK.
117 virtual bool StartInstallingDownloadedWebApk( 116 virtual void InstallDownloadedWebApk(
118 JNIEnv* env, 117 JNIEnv* env,
119 const base::android::ScopedJavaLocalRef<jstring>& java_file_path, 118 const base::android::ScopedJavaLocalRef<jstring>& java_file_path,
120 const base::android::ScopedJavaLocalRef<jstring>& java_package_name); 119 const base::android::ScopedJavaLocalRef<jstring>& java_package_name);
121 120
122 // Starts update using the downloaded WebAPK. Returns whether the updating 121 // Starts update using the downloaded WebAPK.
123 // could be started. The updating may still fail if true is returned.
124 // |file_path| is the file path that the WebAPK was downloaded to. 122 // |file_path| is the file path that the WebAPK was downloaded to.
125 virtual bool StartUpdateUsingDownloadedWebApk( 123 virtual void UpdateUsingDownloadedWebApk(
126 JNIEnv* env, 124 JNIEnv* env,
127 const base::android::ScopedJavaLocalRef<jstring>& java_file_path); 125 const base::android::ScopedJavaLocalRef<jstring>& java_file_path);
128 126
129 // Returns whether Google Play supports installing WebAPKs. 127 // Returns whether Google Play supports installing WebAPKs.
130 virtual bool CanUseGooglePlayInstallService(); 128 virtual bool CanUseGooglePlayInstallService();
131 129
132 // Called when the package name of the WebAPK is available and the install 130 // Called when the package name of the WebAPK is available and the install
133 // or update request is handled by Google Play. 131 // or update request is handled by Google Play.
134 virtual void InstallOrUpdateWebApkFromGooglePlay( 132 virtual void InstallOrUpdateWebApkFromGooglePlay(
135 const std::string& package_name, 133 const std::string& package_name,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 // Points to the Java Object. 279 // Points to the Java Object.
282 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 280 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
283 281
284 // Used to get |weak_ptr_|. 282 // Used to get |weak_ptr_|.
285 base::WeakPtrFactory<WebApkInstaller> weak_ptr_factory_; 283 base::WeakPtrFactory<WebApkInstaller> weak_ptr_factory_;
286 284
287 DISALLOW_COPY_AND_ASSIGN(WebApkInstaller); 285 DISALLOW_COPY_AND_ASSIGN(WebApkInstaller);
288 }; 286 };
289 287
290 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_ 288 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698