OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTOFILL_SAVE_CARD_INFOBAR_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTOFILL_SAVE_CARD_INFOBAR_H_ |
| 7 |
| 8 #include <jni.h> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "chrome/browser/ui/android/infobars/confirm_infobar.h" |
| 13 |
| 14 namespace autofill { |
| 15 class AutofillSaveCardInfoBarDelegateMobile; |
| 16 } |
| 17 |
| 18 // Android implementation of the infobar for saving credit card information. |
| 19 class AutofillSaveCardInfoBar : public ConfirmInfoBar { |
| 20 public: |
| 21 explicit AutofillSaveCardInfoBar( |
| 22 scoped_ptr<autofill::AutofillSaveCardInfoBarDelegateMobile> delegate); |
| 23 ~AutofillSaveCardInfoBar() override; |
| 24 |
| 25 // Called when a link in the legal message text was clicked. |
| 26 void OnLegalMessageLinkClicked(JNIEnv* env, jobject obj, jstring url); |
| 27 |
| 28 // Registers the JNI bindings. |
| 29 static bool Register(JNIEnv* env); |
| 30 |
| 31 private: |
| 32 // ConfirmInfoBar: |
| 33 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
| 34 JNIEnv* env) override; |
| 35 |
| 36 // Returns the infobar delegate. |
| 37 autofill::AutofillSaveCardInfoBarDelegateMobile* GetSaveCardDelegate(); |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(AutofillSaveCardInfoBar); |
| 40 }; |
| 41 |
| 42 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTOFILL_SAVE_CARD_INFOBAR_H_ |
OLD | NEW |