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_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_APP_BANNER_INFOBAR_H_ |
6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_APP_BANNER_INFOBAR_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_APP_BANNER_INFOBAR_H_ |
7 | 7 |
8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "chrome/browser/ui/android/infobars/confirm_infobar.h" | 10 #include "chrome/browser/ui/android/infobars/confirm_infobar.h" |
11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
12 | 12 |
13 namespace banners { | 13 namespace banners { |
14 class AppBannerInfoBarDelegate; | 14 class AppBannerInfoBarDelegate; |
15 } // namespace banners | 15 } // namespace banners |
16 | 16 |
17 | 17 |
18 class AppBannerInfoBar : public ConfirmInfoBar { | 18 class AppBannerInfoBar : public ConfirmInfoBar { |
19 public: | 19 public: |
| 20 // Constructs an AppBannerInfoBar promoting a native app. |
| 21 AppBannerInfoBar( |
| 22 scoped_ptr<banners::AppBannerInfoBarDelegate> delegate, |
| 23 const base::android::ScopedJavaGlobalRef<jobject>& japp_data); |
| 24 |
20 // Constructs an AppBannerInfoBar promoting a web app. | 25 // Constructs an AppBannerInfoBar promoting a web app. |
21 AppBannerInfoBar( | 26 AppBannerInfoBar( |
22 scoped_ptr<banners::AppBannerInfoBarDelegate> delegate, | 27 scoped_ptr<banners::AppBannerInfoBarDelegate> delegate, |
23 const GURL& app_url); | 28 const GURL& app_url); |
24 | 29 |
25 ~AppBannerInfoBar() override; | 30 ~AppBannerInfoBar() override; |
26 | 31 |
27 private: | 32 private: |
28 // InfoBarAndroid overrides. | 33 // InfoBarAndroid overrides. |
29 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | 34 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
30 JNIEnv* env) override; | 35 JNIEnv* env) override; |
31 | 36 |
| 37 // Native app: Details about the app. |
| 38 base::android::ScopedJavaGlobalRef<jobject> japp_data_; |
| 39 |
32 // Web app: URL for the app. | 40 // Web app: URL for the app. |
33 GURL app_url_; | 41 GURL app_url_; |
34 | 42 |
35 base::android::ScopedJavaGlobalRef<jobject> java_infobar_; | 43 base::android::ScopedJavaGlobalRef<jobject> java_infobar_; |
36 | 44 |
37 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBar); | 45 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBar); |
38 }; | 46 }; |
39 | 47 |
40 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_APP_BANNER_INFOBAR_H_ | 48 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_APP_BANNER_INFOBAR_H_ |
OLD | NEW |