Chromium Code Reviews| Index: chrome/browser/ui/android/infobars/autofill_save_card_infobar.h |
| diff --git a/chrome/browser/ui/android/infobars/autofill_save_card_infobar.h b/chrome/browser/ui/android/infobars/autofill_save_card_infobar.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b524b39f36f1acbce75ed49bab7f3ac9b4dbbaf2 |
| --- /dev/null |
| +++ b/chrome/browser/ui/android/infobars/autofill_save_card_infobar.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTOFILL_SAVE_CARD_INFOBAR_H_ |
| +#define CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTOFILL_SAVE_CARD_INFOBAR_H_ |
| + |
| +#include <jni.h> |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "chrome/browser/ui/android/infobars/confirm_infobar.h" |
| + |
| +namespace autofill { |
| +class AutofillSaveCardInfoBarDelegateMobile; |
| +} |
| + |
| +// Android implementation of the infobar for saving credit card information. |
| +class AutofillSaveCardInfoBar : public ConfirmInfoBar { |
| + public: |
| + explicit AutofillSaveCardInfoBar( |
| + scoped_ptr<autofill::AutofillSaveCardInfoBarDelegateMobile> delegate); |
| + ~AutofillSaveCardInfoBar() override; |
| + |
| + // Called when a link in the legal message text was clicked. |
| + void OnLegalMessageLinkClicked(JNIEnv* env, jobject obj, jstring url); |
| + |
| + // Registers the JNI bindings. |
| + static bool Register(JNIEnv* env); |
| + |
| + private: |
| + // ConfirmInfoBar override. |
|
Peter Kasting
2016/01/12 23:09:37
Nit: "// ConfirmInfoBar:"
please use gerrit instead
2016/01/13 21:22:09
Done.
|
| + base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
| + JNIEnv* env) override; |
| + |
| + // Returns the infobar delegate. |
| + autofill::AutofillSaveCardInfoBarDelegateMobile* GetSaveCardDelegate(); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AutofillSaveCardInfoBar); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTOFILL_SAVE_CARD_INFOBAR_H_ |