OLD | NEW |
1 // Copyright (c) 2011 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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 const CreditCard* credit_card, | 28 const CreditCard* credit_card, |
29 PersonalDataManager* personal_data, | 29 PersonalDataManager* personal_data, |
30 const AutofillMetrics* metric_logger); | 30 const AutofillMetrics* metric_logger); |
31 | 31 |
32 private: | 32 private: |
33 virtual ~AutofillCCInfoBarDelegate(); | 33 virtual ~AutofillCCInfoBarDelegate(); |
34 | 34 |
35 void LogUserAction(AutofillMetrics::InfoBarMetric user_action); | 35 void LogUserAction(AutofillMetrics::InfoBarMetric user_action); |
36 | 36 |
37 // ConfirmInfoBarDelegate: | 37 // ConfirmInfoBarDelegate: |
38 virtual bool ShouldExpire( | |
39 const content::LoadCommittedDetails& details) const OVERRIDE; | |
40 virtual void InfoBarDismissed() OVERRIDE; | 38 virtual void InfoBarDismissed() OVERRIDE; |
41 virtual gfx::Image* GetIcon() const OVERRIDE; | 39 virtual gfx::Image* GetIcon() const OVERRIDE; |
42 virtual Type GetInfoBarType() const OVERRIDE; | 40 virtual Type GetInfoBarType() const OVERRIDE; |
| 41 virtual bool ShouldExpireInternal( |
| 42 const content::LoadCommittedDetails& details) const OVERRIDE; |
43 virtual string16 GetMessageText() const OVERRIDE; | 43 virtual string16 GetMessageText() const OVERRIDE; |
44 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 44 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
45 virtual bool Accept() OVERRIDE; | 45 virtual bool Accept() OVERRIDE; |
46 virtual bool Cancel() OVERRIDE; | 46 virtual bool Cancel() OVERRIDE; |
47 virtual string16 GetLinkText() const OVERRIDE; | 47 virtual string16 GetLinkText() const OVERRIDE; |
48 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; | 48 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; |
49 | 49 |
50 // The credit card that should be saved if the user accepts the infobar. | 50 // The credit card that should be saved if the user accepts the infobar. |
51 scoped_ptr<const CreditCard> credit_card_; | 51 scoped_ptr<const CreditCard> credit_card_; |
52 | 52 |
53 // The personal data manager to which the credit card should be saved. | 53 // The personal data manager to which the credit card should be saved. |
54 // Weak reference. | 54 // Weak reference. |
55 PersonalDataManager* personal_data_; | 55 PersonalDataManager* personal_data_; |
56 | 56 |
57 // For logging UMA metrics. | 57 // For logging UMA metrics. |
58 // Weak reference. Owned by the AutofillManager that initiated this infobar. | 58 // Weak reference. Owned by the AutofillManager that initiated this infobar. |
59 const AutofillMetrics* metric_logger_; | 59 const AutofillMetrics* metric_logger_; |
60 | 60 |
61 // Did the user ever explicitly accept or dismiss this infobar? | 61 // Did the user ever explicitly accept or dismiss this infobar? |
62 bool had_user_interaction_; | 62 bool had_user_interaction_; |
63 | 63 |
64 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardInfoBar); | 64 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardInfoBar); |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(AutofillCCInfoBarDelegate); | 66 DISALLOW_COPY_AND_ASSIGN(AutofillCCInfoBarDelegate); |
67 }; | 67 }; |
68 | 68 |
69 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_ | 69 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_CC_INFOBAR_DELEGATE_H_ |
OLD | NEW |