| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CONFIRM_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_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" |
| 11 #include "chrome/browser/ui/android/infobars/infobar_android.h" | 11 #include "chrome/browser/ui/android/infobars/infobar_android.h" |
| 12 #include "components/infobars/core/confirm_infobar_delegate.h" | 12 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 13 | 13 |
| 14 class TabAndroid; |
| 15 |
| 14 class ConfirmInfoBar : public InfoBarAndroid { | 16 class ConfirmInfoBar : public InfoBarAndroid { |
| 15 public: | 17 public: |
| 16 explicit ConfirmInfoBar(std::unique_ptr<ConfirmInfoBarDelegate> delegate); | 18 explicit ConfirmInfoBar(std::unique_ptr<ConfirmInfoBarDelegate> delegate); |
| 17 ~ConfirmInfoBar() override; | 19 ~ConfirmInfoBar() override; |
| 18 | 20 |
| 19 protected: | 21 protected: |
| 22 ConfirmInfoBarDelegate* GetDelegate(); |
| 23 TabAndroid* GetTab(); |
| 20 base::string16 GetTextFor(ConfirmInfoBarDelegate::InfoBarButton button); | 24 base::string16 GetTextFor(ConfirmInfoBarDelegate::InfoBarButton button); |
| 21 ConfirmInfoBarDelegate* GetDelegate(); | |
| 22 void OnLinkClicked(JNIEnv* env, | |
| 23 const base::android::JavaParamRef<jobject>& obj) override; | |
| 24 base::android::ScopedJavaLocalRef<jobject> GetWindowAndroid(); | |
| 25 | 25 |
| 26 // InfoBarAndroid overrides. | 26 // InfoBarAndroid overrides. |
| 27 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | 27 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
| 28 JNIEnv* env) override; | 28 JNIEnv* env) override; |
| 29 | 29 |
| 30 void OnLinkClicked(JNIEnv* env, |
| 31 const base::android::JavaParamRef<jobject>& obj) override; |
| 32 |
| 30 void ProcessButton(int action) override; | 33 void ProcessButton(int action) override; |
| 31 | 34 |
| 32 private: | 35 private: |
| 33 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBar); | 36 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBar); |
| 34 }; | 37 }; |
| 35 | 38 |
| 36 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_ | 39 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_ |
| OLD | NEW |