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