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

Side by Side Diff: chrome/browser/android/banners/app_banner_infobar_delegate_android.h

Issue 2363183002: Skip installation process if WebAPK is already installed. (Closed)
Patch Set: Created 4 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ 5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_
6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_
7 7
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // returned to Chrome. 64 // returned to Chrome.
65 void OnInstallIntentReturned(JNIEnv* env, 65 void OnInstallIntentReturned(JNIEnv* env,
66 const base::android::JavaParamRef<jobject>& obj, 66 const base::android::JavaParamRef<jobject>& obj,
67 jboolean jis_installing); 67 jboolean jis_installing);
68 68
69 // Called when the InstallerDelegate task has finished. 69 // Called when the InstallerDelegate task has finished.
70 void OnInstallFinished(JNIEnv* env, 70 void OnInstallFinished(JNIEnv* env,
71 const base::android::JavaParamRef<jobject>& obj, 71 const base::android::JavaParamRef<jobject>& obj,
72 jboolean success); 72 jboolean success);
73 73
74 // TODO(zpeng): Move function from public to private.
dominickn 2016/09/28 02:10:26 Remove this comment, since this method was moved t
F 2016/09/30 18:02:02 Done.
74 // When user accepts to install a WebAPK, this function sends a request 75 // When user accepts to install a WebAPK, this function sends a request
75 // to the WebAPK Server to create a WebAPK and install it. It returns 76 // to the WebAPK Server to create a WebAPK and install it. It returns
76 // false to prevent infobar from disappearing when installation starts. 77 // false to prevent infobar from disappearing when installation starts.
77 // When user clicks the Open button after the intallation is compelete, this 78 // When user clicks the Open button after the intallation is compelete, this
78 // function launches the installed WebAPK and returns true. 79 // function launches the installed WebAPK and returns true.
79 bool AcceptWebApk(content::WebContents* web_contents); 80 bool AcceptWebApk(content::WebContents* web_contents);
80 81
81 private: 82 private:
82 // The states of a WebAPK installation, where the infobar is displayed during 83 // The states of a WebAPK installation, where the infobar is displayed during
83 // the entire installation process. This state is used to correctly record 84 // the entire installation process. This state is used to correctly record
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 151
151 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); 152 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid);
152 }; 153 };
153 154
154 // Register native methods. 155 // Register native methods.
155 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); 156 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env);
156 157
157 } // namespace banners 158 } // namespace banners
158 159
159 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ 160 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698