#include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
#include "base/logging.h"
-#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "components/autofill/core/browser/credit_card.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/common/autofill_constants.h"
+#include "components/infobars/core/infobar.h"
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
}
int AutofillCCInfoBarDelegate::GetIconID() const {
- return IDR_INFOBAR_AUTOFILL;
+ return IDR_INFOBAR_AUTOFILL_CC;
}
-InfoBarDelegate::Type AutofillCCInfoBarDelegate::GetInfoBarType() const {
+infobars::InfoBarDelegate::Type AutofillCCInfoBarDelegate::GetInfoBarType()
+ const {
return PAGE_ACTION_TYPE;
}
bool AutofillCCInfoBarDelegate::ShouldExpireInternal(
- const content::LoadCommittedDetails& details) const {
+ const NavigationDetails& details) const {
// The user has submitted a form, causing the page to navigate elsewhere. We
// don't want the infobar to be expired at this point, because the user won't
// get a chance to answer the question.
}
bool AutofillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
- web_contents()->OpenURL(content::OpenURLParams(
- GURL(autofill::kHelpURL), content::Referrer(),
- (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
- content::PAGE_TRANSITION_LINK, false));
+ InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL(
+ content::OpenURLParams(
+ GURL(autofill::kHelpURL), content::Referrer(),
+ (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
+ content::PAGE_TRANSITION_LINK, false));
return false;
}