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_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/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "components/infobars/core/confirm_infobar_delegate.h" | 10 #include "components/infobars/core/confirm_infobar_delegate.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 namespace banners { | 25 namespace banners { |
26 | 26 |
27 // Manages installation of an app being promoted by a webpage. | 27 // Manages installation of an app being promoted by a webpage. |
28 class AppBannerInfoBarDelegateAndroid : public ConfirmInfoBarDelegate { | 28 class AppBannerInfoBarDelegateAndroid : public ConfirmInfoBarDelegate { |
29 public: | 29 public: |
30 // Delegate for promoting a web app. | 30 // Delegate for promoting a web app. |
31 AppBannerInfoBarDelegateAndroid( | 31 AppBannerInfoBarDelegateAndroid( |
32 int event_request_id, | 32 int event_request_id, |
33 const base::string16& app_title, | 33 const base::string16& app_title, |
| 34 SkBitmap* splash_icon, |
34 SkBitmap* app_icon, | 35 SkBitmap* app_icon, |
35 const content::Manifest& web_app_data); | 36 const content::Manifest& web_app_data); |
36 | 37 |
37 // Delegate for promoting an Android app. | 38 // Delegate for promoting an Android app. |
38 AppBannerInfoBarDelegateAndroid( | 39 AppBannerInfoBarDelegateAndroid( |
39 int event_request_id, | 40 int event_request_id, |
40 const base::string16& app_title, | 41 const base::string16& app_title, |
41 SkBitmap* app_icon, | 42 SkBitmap* app_icon, |
42 const base::android::ScopedJavaGlobalRef<jobject>& native_app_data, | 43 const base::android::ScopedJavaGlobalRef<jobject>& native_app_data, |
43 const std::string& native_app_package, | 44 const std::string& native_app_package, |
(...skipping 24 matching lines...) Expand all Loading... |
68 gfx::Image GetIcon() const override; | 69 gfx::Image GetIcon() const override; |
69 void InfoBarDismissed() override; | 70 void InfoBarDismissed() override; |
70 base::string16 GetMessageText() const override; | 71 base::string16 GetMessageText() const override; |
71 int GetButtons() const override; | 72 int GetButtons() const override; |
72 bool Accept() override; | 73 bool Accept() override; |
73 bool LinkClicked(WindowOpenDisposition disposition) override; | 74 bool LinkClicked(WindowOpenDisposition disposition) override; |
74 | 75 |
75 base::android::ScopedJavaGlobalRef<jobject> java_delegate_; | 76 base::android::ScopedJavaGlobalRef<jobject> java_delegate_; |
76 | 77 |
77 base::string16 app_title_; | 78 base::string16 app_title_; |
| 79 scoped_ptr<SkBitmap> splash_icon_; |
78 scoped_ptr<SkBitmap> app_icon_; | 80 scoped_ptr<SkBitmap> app_icon_; |
79 | 81 |
80 int event_request_id_; | 82 int event_request_id_; |
81 content::Manifest web_app_data_; | 83 content::Manifest web_app_data_; |
82 | 84 |
83 base::android::ScopedJavaGlobalRef<jobject> native_app_data_; | 85 base::android::ScopedJavaGlobalRef<jobject> native_app_data_; |
84 std::string native_app_package_; | 86 std::string native_app_package_; |
85 std::string referrer_; | 87 std::string referrer_; |
86 bool has_user_interaction_; | 88 bool has_user_interaction_; |
87 | 89 |
88 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); | 90 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); |
89 }; // AppBannerInfoBarDelegateAndroid | 91 }; // AppBannerInfoBarDelegateAndroid |
90 | 92 |
91 // Register native methods. | 93 // Register native methods. |
92 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); | 94 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); |
93 | 95 |
94 } // namespace banners | 96 } // namespace banners |
95 | 97 |
96 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ | 98 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ |
OLD | NEW |