| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/autofill/new_credit_card_bubble_controller.h" | 5 #include "chrome/browser/ui/autofill/new_credit_card_bubble_controller.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/ui/autofill/data_model_wrapper.h" | 13 #include "chrome/browser/ui/autofill/data_model_wrapper.h" |
| 14 #include "chrome/browser/ui/autofill/new_credit_card_bubble_view.h" | 14 #include "chrome/browser/ui/autofill/new_credit_card_bubble_view.h" |
| 15 #include "chrome/browser/ui/browser_finder.h" | 15 #include "chrome/browser/ui/browser_finder.h" |
| 16 #include "chrome/browser/ui/chrome_pages.h" | 16 #include "chrome/browser/ui/chrome_pages.h" |
| 17 #include "chrome/browser/ui/host_desktop.h" | 17 #include "chrome/browser/ui/host_desktop.h" |
| 18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
| 19 #include "components/autofill/core/browser/autofill_profile.h" | 19 #include "components/autofill/core/browser/autofill_profile.h" |
| 20 #include "components/autofill/core/browser/credit_card.h" | 20 #include "components/autofill/core/browser/credit_card.h" |
| 21 #include "grit/chromium_strings.h" | 21 #include "grit/chromium_strings.h" |
| 22 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
| 23 #include "grit/theme_resources.h" | 23 #include "grit/theme_resources.h" |
| 24 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
| 25 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
| 26 | 26 |
| 27 namespace autofill { | 27 namespace autofill { |
| 28 | 28 |
| 29 namespace { | |
| 30 | |
| 31 static const int kMaxGeneratedCardTimesToShow = 5; | |
| 32 static const char kWalletGeneratedCardLearnMoreLink[] = | |
| 33 "http://support.google.com/wallet/bin/answer.py?hl=en&answer=2740044"; | |
| 34 | |
| 35 } // namespace | |
| 36 | |
| 37 CreditCardDescription::CreditCardDescription() {} | 29 CreditCardDescription::CreditCardDescription() {} |
| 38 CreditCardDescription::~CreditCardDescription() {} | 30 CreditCardDescription::~CreditCardDescription() {} |
| 39 | 31 |
| 40 NewCreditCardBubbleController::~NewCreditCardBubbleController() { | 32 NewCreditCardBubbleController::~NewCreditCardBubbleController() { |
| 41 Hide(); | 33 Hide(); |
| 42 } | 34 } |
| 43 | 35 |
| 44 // static | 36 // static |
| 45 void NewCreditCardBubbleController::Show( | 37 void NewCreditCardBubbleController::Show( |
| 46 Profile* profile, | 38 Profile* profile, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 116 |
| 125 bubble_->Show(); | 117 bubble_->Show(); |
| 126 } | 118 } |
| 127 | 119 |
| 128 void NewCreditCardBubbleController::Hide() { | 120 void NewCreditCardBubbleController::Hide() { |
| 129 if (bubble_) | 121 if (bubble_) |
| 130 bubble_->Hide(); | 122 bubble_->Hide(); |
| 131 } | 123 } |
| 132 | 124 |
| 133 } // namespace autofill | 125 } // namespace autofill |
| OLD | NEW |