OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <string> | 9 #include <string> |
10 | 10 |
11 #include "chrome/browser/tab_contents/infobar_delegate.h" | 11 #include "chrome/browser/tab_contents/infobar_delegate.h" |
12 | 12 |
13 class AutoFillManager; | 13 class AutoFillManager; |
14 class Browser; | 14 class Browser; |
15 class SkBitmap; | 15 class SkBitmap; |
16 class TabContents; | 16 class TabContents; |
17 | 17 |
18 // An InfoBar delegate that enables the user to allow or deny storing credit | 18 // An InfoBar delegate that enables the user to allow or deny storing credit |
19 // card information gathered from a form submission. | 19 // card information gathered from a form submission. |
20 class AutoFillCCInfoBarDelegate : public ConfirmInfoBarDelegate { | 20 class AutoFillCCInfoBarDelegate : public ConfirmInfoBarDelegate { |
21 public: | 21 public: |
22 AutoFillCCInfoBarDelegate(TabContents* tab_contents, AutoFillManager* host); | 22 AutoFillCCInfoBarDelegate(TabContents* tab_contents, AutoFillManager* host); |
23 virtual ~AutoFillCCInfoBarDelegate(); | 23 virtual ~AutoFillCCInfoBarDelegate(); |
24 | 24 |
25 // ConfirmInfoBarDelegate implementation. | 25 // ConfirmInfoBarDelegate implementation. |
26 virtual bool ShouldExpire( | 26 virtual bool ShouldExpire( |
27 const NavigationController::LoadCommittedDetails& details) const; | 27 const NavigationController::LoadCommittedDetails& details) const; |
28 virtual void InfoBarClosed(); | 28 virtual void InfoBarClosed(); |
29 virtual std::wstring GetMessageText() const; | 29 virtual string16 GetMessageText() const; |
30 virtual SkBitmap* GetIcon() const; | 30 virtual SkBitmap* GetIcon() const; |
31 virtual int GetButtons() const; | 31 virtual int GetButtons() const; |
32 virtual std::wstring GetButtonLabel( | 32 virtual string16 GetButtonLabel( |
33 ConfirmInfoBarDelegate::InfoBarButton button) const; | 33 ConfirmInfoBarDelegate::InfoBarButton button) const; |
34 virtual bool Accept(); | 34 virtual bool Accept(); |
35 virtual bool Cancel(); | 35 virtual bool Cancel(); |
36 virtual std::wstring GetLinkText(); | 36 virtual string16 GetLinkText(); |
37 virtual bool LinkClicked(WindowOpenDisposition disposition); | 37 virtual bool LinkClicked(WindowOpenDisposition disposition); |
38 | 38 |
39 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
40 // Overridden from InfoBarDelegate: | 40 // Overridden from InfoBarDelegate: |
41 virtual InfoBar* CreateInfoBar(); | 41 virtual InfoBar* CreateInfoBar(); |
42 #endif // defined(OS_WIN) | 42 #endif // defined(OS_WIN) |
43 | 43 |
44 virtual Type GetInfoBarType() { | 44 virtual Type GetInfoBarType() { |
45 return PAGE_ACTION_TYPE; | 45 return PAGE_ACTION_TYPE; |
46 } | 46 } |
47 | 47 |
48 private: | 48 private: |
49 // The browser. | 49 // The browser. |
50 Browser* browser_; | 50 Browser* browser_; |
51 | 51 |
52 // The AutoFillManager that initiated this InfoBar. | 52 // The AutoFillManager that initiated this InfoBar. |
53 AutoFillManager* host_; | 53 AutoFillManager* host_; |
54 | 54 |
55 DISALLOW_COPY_AND_ASSIGN(AutoFillCCInfoBarDelegate); | 55 DISALLOW_COPY_AND_ASSIGN(AutoFillCCInfoBarDelegate); |
56 }; | 56 }; |
57 | 57 |
58 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_ | 58 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_ |
OLD | NEW |