Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_UI_ANDROID_INFOBARS_APP_BANNER_INFOBAR_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_APP_BANNER_INFOBAR_ANDROID_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_APP_BANNER_INFOBAR_ANDROID_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_APP_BANNER_INFOBAR_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 "chrome/browser/ui/android/infobars/confirm_infobar.h" | 10 #include "chrome/browser/ui/android/infobars/confirm_infobar.h" |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 const GURL& app_url, | 28 const GURL& app_url, |
| 29 bool is_webapk); | 29 bool is_webapk); |
| 30 | 30 |
| 31 ~AppBannerInfoBarAndroid() override; | 31 ~AppBannerInfoBarAndroid() override; |
| 32 | 32 |
| 33 // Called when the installation state of the app may have changed. | 33 // Called when the installation state of the app may have changed. |
| 34 // Updates the InfoBar visuals to match the new state and re-enables controls | 34 // Updates the InfoBar visuals to match the new state and re-enables controls |
| 35 // that may have been disabled. | 35 // that may have been disabled. |
| 36 void OnInstallStateChanged(int new_state); | 36 void OnInstallStateChanged(int new_state); |
| 37 | 37 |
| 38 // Called when user clicks the "Add To Homescreen" from the app menu to | |
| 39 // install a WebAPK. The banner skips the state of showing "Add To | |
| 40 // Homescreen" on the button and jumps to the state of showing "Adding" | |
| 41 // and starts the installation. | |
| 42 void InstallWebApk(content::WebContents* web_contents); | |
|
gone
2016/08/31 18:12:46
I don't think this function belongs here because i
Xi Han
2016/08/31 20:11:48
Hmm, this call needs to be made after both AppBann
gone
2016/08/31 20:24:22
Your change to AppBannerInfoBarAndroid::InstallWeb
Xi Han
2016/08/31 20:59:24
You are right, updated. Thanks:)
| |
| 43 | |
| 38 private: | 44 private: |
| 39 // InfoBarAndroid overrides. | 45 // InfoBarAndroid overrides. |
| 40 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | 46 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
| 41 JNIEnv* env) override; | 47 JNIEnv* env) override; |
| 42 | 48 |
| 43 // Native app: Details about the app. | 49 // Native app: Details about the app. |
| 44 base::android::ScopedJavaGlobalRef<jobject> japp_data_; | 50 base::android::ScopedJavaGlobalRef<jobject> japp_data_; |
| 45 | 51 |
| 46 // Web app: URL for the app. | 52 // Web app: URL for the app. |
| 47 GURL app_url_; | 53 GURL app_url_; |
| 48 | 54 |
| 49 // Indicates whether the info bar is for installing a WebAPK. | 55 // Indicates whether the info bar is for installing a WebAPK. |
| 50 bool is_webapk_; | 56 bool is_webapk_; |
| 51 | 57 |
| 52 base::android::ScopedJavaGlobalRef<jobject> java_infobar_; | 58 base::android::ScopedJavaGlobalRef<jobject> java_infobar_; |
| 53 | 59 |
| 54 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarAndroid); | 60 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarAndroid); |
| 55 }; | 61 }; |
| 56 | 62 |
| 57 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_APP_BANNER_INFOBAR_ANDROID_H_ | 63 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_APP_BANNER_INFOBAR_ANDROID_H_ |
| OLD | NEW |