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

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

Issue 2882243002: Remove ChromeWebApkHost::GetGooglePlayInstallState() check from WebApkInstaller (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/android/webapk/webapk_installer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 // Registers JNI hooks. 97 // Registers JNI hooks.
98 static bool Register(JNIEnv* env); 98 static bool Register(JNIEnv* env);
99 99
100 protected: 100 protected:
101 WebApkInstaller(content::BrowserContext* browser_context, 101 WebApkInstaller(content::BrowserContext* browser_context,
102 const ShortcutInfo& shortcut_info, 102 const ShortcutInfo& shortcut_info,
103 const SkBitmap& primary_icon, 103 const SkBitmap& primary_icon,
104 const SkBitmap& badge_icon); 104 const SkBitmap& badge_icon);
105 105
106 // Returns whether the device supports installing WebAPKs.
107 virtual bool CanInstallWebApks();
108
109 // Called when the package name of the WebAPK is available and the install 106 // Called when the package name of the WebAPK is available and the install
110 // or update request should be issued. 107 // or update request should be issued.
111 virtual void InstallOrUpdateWebApk(const std::string& package_name, 108 virtual void InstallOrUpdateWebApk(const std::string& package_name,
112 int version, 109 int version,
113 const std::string& token); 110 const std::string& token);
114 111
115 // Called when the install or update process has completed or failed. 112 // Called when the install or update process has completed or failed.
116 void OnResult(WebApkInstallResult result); 113 void OnResult(WebApkInstallResult result);
117 114
118 private: 115 private:
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // Points to the Java Object. 210 // Points to the Java Object.
214 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 211 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
215 212
216 // Used to get |weak_ptr_|. 213 // Used to get |weak_ptr_|.
217 base::WeakPtrFactory<WebApkInstaller> weak_ptr_factory_; 214 base::WeakPtrFactory<WebApkInstaller> weak_ptr_factory_;
218 215
219 DISALLOW_COPY_AND_ASSIGN(WebApkInstaller); 216 DISALLOW_COPY_AND_ASSIGN(WebApkInstaller);
220 }; 217 };
221 218
222 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_ 219 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/webapk/webapk_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698