Index: components/autofill/core/browser/autofill_cc_infobar_delegate.h |
diff --git a/components/autofill/core/browser/autofill_cc_infobar_delegate.h b/components/autofill/core/browser/autofill_cc_infobar_delegate.h |
index 55c6de0f826095d18f296fd5ad77f169d0491040..7b5bec21db34de728c2e47bd70901a57c4ce1883 100644 |
--- a/components/autofill/core/browser/autofill_cc_infobar_delegate.h |
+++ b/components/autofill/core/browser/autofill_cc_infobar_delegate.h |
@@ -14,12 +14,18 @@ |
#include "components/infobars/core/confirm_infobar_delegate.h" |
#include "ui/base/window_open_disposition.h" |
+namespace base { |
+class DictionaryValue; |
+} |
+ |
namespace infobars { |
class InfoBarManager; |
} |
namespace autofill { |
+class CreditCard; |
+ |
// An InfoBar delegate that enables the user to allow or deny storing credit |
// card information gathered from a form submission. |
class AutofillCCInfoBarDelegate : public ConfirmInfoBarDelegate { |
@@ -27,9 +33,12 @@ class AutofillCCInfoBarDelegate : public ConfirmInfoBarDelegate { |
// Creates an autofill credit card infobar and delegate and adds the infobar |
// to |infobar_manager|. |
static void CreateForLocalSave(infobars::InfoBarManager* infobar_manager, |
- const base::Closure& save_card_callback); |
+ const base::Closure& save_card_callback, |
Justin Donnelly
2015/12/30 18:06:37
Likewise I think we should maintain the callback a
please use gerrit instead
2016/01/07 01:39:25
Done.
|
+ const CreditCard& card); |
static void CreateForUpload(infobars::InfoBarManager* infobar_manager, |
- const base::Closure& save_card_callback); |
+ const base::Closure& save_card_callback, |
+ const CreditCard& card, |
+ scoped_ptr<base::DictionaryValue> legal_message); |
#if defined(UNIT_TEST) |
static scoped_ptr<ConfirmInfoBarDelegate> Create( |
@@ -41,7 +50,9 @@ class AutofillCCInfoBarDelegate : public ConfirmInfoBarDelegate { |
private: |
AutofillCCInfoBarDelegate(bool upload, |
- const base::Closure& save_card_callback); |
+ const base::Closure& save_card_callback, |
+ const CreditCard& card, |
+ scoped_ptr<base::DictionaryValue> legal_message); |
~AutofillCCInfoBarDelegate() override; |
void LogUserAction(AutofillMetrics::InfoBarMetric user_action); |
@@ -50,6 +61,8 @@ class AutofillCCInfoBarDelegate : public ConfirmInfoBarDelegate { |
Type GetInfoBarType() const override; |
int GetIconId() const override; |
gfx::VectorIconId GetVectorIconId() const override; |
+ const std::vector<Detail>& GetDetails() const override; |
+ const std::vector<Description>& GetDescriptions() const override; |
bool ShouldExpire(const NavigationDetails& details) const override; |
void InfoBarDismissed() override; |
base::string16 GetMessageText() const override; |
@@ -59,11 +72,18 @@ class AutofillCCInfoBarDelegate : public ConfirmInfoBarDelegate { |
base::string16 GetLinkText() const override; |
GURL GetLinkURL() const override; |
+ // Whether the infobar is for uploading the credit card. |
bool upload_; |
// The callback to save credit card if the user accepts the infobar. |
base::Closure save_card_callback_; |
+ // The card details to show in the content of the infobar. |
+ std::vector<Detail> card_details_; |
+ |
+ // The legal messages to show in the content of the infobar. |
+ std::vector<Description> legal_messages_; |
+ |
// Did the user ever explicitly accept or dismiss this infobar? |
bool had_user_interaction_; |