| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "chrome/browser/ui/android/infobars/infobar_android.h" | 10 #include "chrome/browser/ui/android/infobars/infobar_android.h" |
| 11 #include "components/infobars/core/confirm_infobar_delegate.h" | 11 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 12 | 12 |
| 13 class ConfirmInfoBar : public InfoBarAndroid { | 13 class ConfirmInfoBar : public InfoBarAndroid { |
| 14 public: | 14 public: |
| 15 explicit ConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate> delegate); | 15 explicit ConfirmInfoBar(std::unique_ptr<ConfirmInfoBarDelegate> delegate); |
| 16 ~ConfirmInfoBar() override; | 16 ~ConfirmInfoBar() override; |
| 17 | 17 |
| 18 protected: | 18 protected: |
| 19 base::string16 GetTextFor(ConfirmInfoBarDelegate::InfoBarButton button); | 19 base::string16 GetTextFor(ConfirmInfoBarDelegate::InfoBarButton button); |
| 20 ConfirmInfoBarDelegate* GetDelegate(); | 20 ConfirmInfoBarDelegate* GetDelegate(); |
| 21 void OnLinkClicked(JNIEnv* env, | 21 void OnLinkClicked(JNIEnv* env, |
| 22 const base::android::JavaParamRef<jobject>& obj) override; | 22 const base::android::JavaParamRef<jobject>& obj) override; |
| 23 | 23 |
| 24 // InfoBarAndroid overrides. | 24 // InfoBarAndroid overrides. |
| 25 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | 25 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
| 26 JNIEnv* env) override; | 26 JNIEnv* env) override; |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 void ProcessButton(int action) override; | 29 void ProcessButton(int action) override; |
| 30 | 30 |
| 31 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBar); | 31 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBar); |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 // Registers native methods. | 34 // Registers native methods. |
| 35 bool RegisterConfirmInfoBar(JNIEnv* env); | 35 bool RegisterConfirmInfoBar(JNIEnv* env); |
| 36 | 36 |
| 37 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_ | 37 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_ |
| OLD | NEW |