Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Unified Diff: chrome/browser/ui/android/infobars/autofill_cc_infobar.h

Issue 1540423004: Add card details and legal message to Android save credit card infobar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Justin's nits. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/android/infobars/autofill_cc_infobar.h
diff --git a/chrome/browser/ui/android/infobars/autofill_cc_infobar.h b/chrome/browser/ui/android/infobars/autofill_cc_infobar.h
new file mode 100644
index 0000000000000000000000000000000000000000..00fb8c8060aeb4893698e7618134a513f05048e6
--- /dev/null
+++ b/chrome/browser/ui/android/infobars/autofill_cc_infobar.h
@@ -0,0 +1,39 @@
+// 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_CC_INFOBAR_H_
+#define CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTOFILL_CC_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 AutofillCCInfoBarDelegate;
+}
+
+// Android implementation of the infobar for saving credit card information.
+class AutofillCCInfoBar : public ConfirmInfoBar {
+ public:
+ // Register the JNI bindings.
Peter Kasting 2016/01/08 00:34:31 Function comments should be declarative ("Register
please use gerrit instead 2016/01/12 00:47:25 Done.
+ static bool Register(JNIEnv* env);
Peter Kasting 2016/01/08 00:34:31 Nit: Per Google style guide, static methods go aft
please use gerrit instead 2016/01/12 00:47:25 Done.
+
+ explicit AutofillCCInfoBar(
+ scoped_ptr<autofill::AutofillCCInfoBarDelegate> delegate);
+ ~AutofillCCInfoBar() override;
+
+ // Called when a link in the legal message text was clicked.
+ void OnLegalMessageLinkClicked(JNIEnv* env, jobject obj, jstring url);
+
+ private:
+ // ConfirmInfoBar override.
+ base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar(
+ JNIEnv* env) override;
+
+ DISALLOW_COPY_AND_ASSIGN(AutofillCCInfoBar);
+};
+
+#endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTOFILL_CC_INFOBAR_H_

Powered by Google App Engine
This is Rietveld 408576698