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/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 void OnInstallFinished(JNIEnv* env, | 62 void OnInstallFinished(JNIEnv* env, |
63 const base::android::JavaParamRef<jobject>& obj, | 63 const base::android::JavaParamRef<jobject>& obj, |
64 jboolean success); | 64 jboolean success); |
65 | 65 |
66 private: | 66 private: |
67 void CreateJavaDelegate(); | 67 void CreateJavaDelegate(); |
68 void SendBannerAccepted(content::WebContents* web_contents, | 68 void SendBannerAccepted(content::WebContents* web_contents, |
69 const std::string& platform); | 69 const std::string& platform); |
70 | 70 |
71 // ConfirmInfoBarDelegate: | 71 // ConfirmInfoBarDelegate: |
| 72 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
72 gfx::Image GetIcon() const override; | 73 gfx::Image GetIcon() const override; |
73 void InfoBarDismissed() override; | 74 void InfoBarDismissed() override; |
74 base::string16 GetMessageText() const override; | 75 base::string16 GetMessageText() const override; |
75 int GetButtons() const override; | 76 int GetButtons() const override; |
76 bool Accept() override; | 77 bool Accept() override; |
77 bool LinkClicked(WindowOpenDisposition disposition) override; | 78 bool LinkClicked(WindowOpenDisposition disposition) override; |
78 | 79 |
79 base::android::ScopedJavaGlobalRef<jobject> java_delegate_; | 80 base::android::ScopedJavaGlobalRef<jobject> java_delegate_; |
80 | 81 |
81 // Used to fetch the splash screen icon for webapps. | 82 // Used to fetch the splash screen icon for webapps. |
(...skipping 12 matching lines...) Expand all Loading... |
94 | 95 |
95 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); | 96 DISALLOW_COPY_AND_ASSIGN(AppBannerInfoBarDelegateAndroid); |
96 }; // AppBannerInfoBarDelegateAndroid | 97 }; // AppBannerInfoBarDelegateAndroid |
97 | 98 |
98 // Register native methods. | 99 // Register native methods. |
99 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); | 100 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env); |
100 | 101 |
101 } // namespace banners | 102 } // namespace banners |
102 | 103 |
103 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ | 104 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_INFOBAR_DELEGATE_ANDROID_H_ |
OLD | NEW |