autofill_cc_infobar_delegate.h revision dc0f95d653279beabeb9817299e2902918ba123e
1// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_
6#define CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_
7#pragma once
8
9#include "base/string16.h"
10#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
11
12class AutofillManager;
13
14// An InfoBar delegate that enables the user to allow or deny storing credit
15// card information gathered from a form submission.
16class AutoFillCCInfoBarDelegate : public ConfirmInfoBarDelegate {
17 public:
18  AutoFillCCInfoBarDelegate(TabContents* tab_contents, AutofillManager* host);
19
20 private:
21  virtual ~AutoFillCCInfoBarDelegate();
22
23  // ConfirmInfoBarDelegate:
24  virtual bool ShouldExpire(
25      const NavigationController::LoadCommittedDetails& details) const;
26  virtual void InfoBarClosed();
27  virtual SkBitmap* GetIcon() const;
28  virtual Type GetInfoBarType() const;
29  virtual string16 GetMessageText() const;
30  virtual string16 GetButtonLabel(InfoBarButton button) const;
31  virtual bool Accept();
32  virtual bool Cancel();
33  virtual string16 GetLinkText();
34  virtual bool LinkClicked(WindowOpenDisposition disposition);
35
36  // The AutofillManager that initiated this InfoBar.
37  AutofillManager* host_;
38
39  DISALLOW_COPY_AND_ASSIGN(AutoFillCCInfoBarDelegate);
40};
41
42#endif  // CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_
43