diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 22:34:38 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 22:34:38 +0000 |
commit | cf8ebbba224c7d01170a46d81b3feda976298b67 (patch) | |
tree | 3ab819a18e818d03820c43f676de1ea3b0f997f2 /chrome/browser/autofill/autofill_cc_infobar_delegate.h | |
parent | 6d11e40470ab1574c8a2a85389a281a5436e8263 (diff) | |
download | chromium_src-cf8ebbba224c7d01170a46d81b3feda976298b67.zip chromium_src-cf8ebbba224c7d01170a46d81b3feda976298b67.tar.gz chromium_src-cf8ebbba224c7d01170a46d81b3feda976298b67.tar.bz2 |
Add "save credit card info?" infobar for Autofill.
BUG=http://crbug.com/48114
TEST=none (depends on bug 47428)
Review URL: http://codereview.chromium.org/2949002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51908 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/autofill_cc_infobar_delegate.h')
-rw-r--r-- | chrome/browser/autofill/autofill_cc_infobar_delegate.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.h b/chrome/browser/autofill/autofill_cc_infobar_delegate.h new file mode 100644 index 0000000..9d476a7 --- /dev/null +++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.h @@ -0,0 +1,48 @@ +// Copyright (c) 2010 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_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_ +#define CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_ + +#include <string> + +#include "chrome/browser/tab_contents/infobar_delegate.h" + +class AutoFillManager; +class Browser; +class SkBitmap; +class TabContents; + +// An InfoBar delegate that enables the user to allow or deny storing credit +// card information gathered from a form submission. +class AutoFillCCInfoBarDelegate : public ConfirmInfoBarDelegate { + public: + AutoFillCCInfoBarDelegate(TabContents* tab_contents, AutoFillManager* host); + virtual ~AutoFillCCInfoBarDelegate(); + + // ConfirmInfoBarDelegate implementation. + virtual bool ShouldExpire( + const NavigationController::LoadCommittedDetails& details) const; + virtual void InfoBarClosed(); + virtual std::wstring GetMessageText() const; + virtual SkBitmap* GetIcon() const; + virtual int GetButtons() const; + virtual std::wstring GetButtonLabel( + ConfirmInfoBarDelegate::InfoBarButton button) const; + virtual bool Accept(); + virtual bool Cancel(); + virtual std::wstring GetLinkText(); + virtual bool LinkClicked(WindowOpenDisposition disposition); + + private: + // The browser. + Browser* browser_; + + // The AutoFillManager that initiated this InfoBar. + AutoFillManager* host_; + + DISALLOW_COPY_AND_ASSIGN(AutoFillCCInfoBarDelegate); +}; + +#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_ |