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 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" | 5 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "chrome/browser/autofill/autofill_cc_infobar.h" |
9 #include "chrome/browser/autofill/autofill_manager.h" | 10 #include "chrome/browser/autofill/autofill_manager.h" |
10 #include "chrome/browser/browser.h" | 11 #include "chrome/browser/browser.h" |
11 #include "chrome/browser/pref_service.h" | 12 #include "chrome/browser/pref_service.h" |
12 #include "chrome/browser/profile.h" | 13 #include "chrome/browser/profile.h" |
13 #include "chrome/browser/tab_contents/tab_contents.h" | 14 #include "chrome/browser/tab_contents/tab_contents.h" |
14 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | 15 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
15 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
16 #include "grit/chromium_strings.h" | 17 #include "grit/chromium_strings.h" |
17 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
18 #include "grit/theme_resources.h" | 19 #include "grit/theme_resources.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 std::wstring AutoFillCCInfoBarDelegate::GetLinkText() { | 98 std::wstring AutoFillCCInfoBarDelegate::GetLinkText() { |
98 return l10n_util::GetString(IDS_AUTOFILL_CC_LEARN_MORE); | 99 return l10n_util::GetString(IDS_AUTOFILL_CC_LEARN_MORE); |
99 } | 100 } |
100 | 101 |
101 bool AutoFillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { | 102 bool AutoFillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { |
102 browser_->OpenURL(GURL(kAutoFillLearnMoreUrl), GURL(), NEW_FOREGROUND_TAB, | 103 browser_->OpenURL(GURL(kAutoFillLearnMoreUrl), GURL(), NEW_FOREGROUND_TAB, |
103 PageTransition::TYPED); | 104 PageTransition::TYPED); |
104 return false; | 105 return false; |
105 } | 106 } |
106 | 107 |
| 108 #if defined(OS_WIN) |
| 109 InfoBar* AutoFillCCInfoBarDelegate::CreateInfoBar() { |
| 110 return CreateAutofillCcInfoBar(this); |
| 111 } |
| 112 #endif // defined(OS_WIN) |
| 113 |
OLD | NEW |