| 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 #import "chrome/browser/autofill/autofill_credit_card_sheet_controller_mac.h" | 5 #import "chrome/browser/autofill/autofill_credit_card_sheet_controller_mac.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/mac_util.h" | 8 #include "base/mac_util.h" |
| 9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 10 #import "chrome/browser/autofill/autofill_credit_card_model_mac.h" | 10 #import "chrome/browser/autofill/autofill_credit_card_model_mac.h" |
| 11 #import "chrome/browser/autofill/autofill_dialog_controller_mac.h" | 11 #import "chrome/browser/autofill/autofill_dialog_controller_mac.h" |
| 12 #include "chrome/browser/autofill/credit_card.h" | 12 #include "chrome/browser/autofill/credit_card.h" |
| 13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
| 14 | 14 |
| 15 // Interface exposed for unit testing. |
| 16 @implementation AutoFillCreditCardSheetController (ExposedForUnitTests) |
| 17 - (NSTextField*)creditCardNumberField { |
| 18 return creditCardNumberField_; |
| 19 } |
| 20 @end |
| 21 |
| 15 // Private methods for the |AutoFillCreditCardSheetController| class. | 22 // Private methods for the |AutoFillCreditCardSheetController| class. |
| 16 @interface AutoFillCreditCardSheetController (PrivateMethods) | 23 @interface AutoFillCreditCardSheetController (PrivateMethods) |
| 17 - (void)buildBillingAddressContents; | 24 - (void)buildBillingAddressContents; |
| 18 - (void)buildExpirationMonthContents; | 25 - (void)buildExpirationMonthContents; |
| 19 - (void)buildExpirationYearContents; | 26 - (void)buildExpirationYearContents; |
| 20 @end | 27 @end |
| 21 | 28 |
| 22 @implementation AutoFillCreditCardSheetController | 29 @implementation AutoFillCreditCardSheetController |
| 23 | 30 |
| 24 @synthesize creditCardModel = creditCardModel_; | 31 @synthesize creditCardModel = creditCardModel_; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 indexOfObject:[creditCardModel_ expirationYear]] == NSNotFound) { | 163 indexOfObject:[creditCardModel_ expirationYear]] == NSNotFound) { |
| 157 [creditCardModel_ setExpirationYear:@" "]; | 164 [creditCardModel_ setExpirationYear:@" "]; |
| 158 } | 165 } |
| 159 | 166 |
| 160 // Disable first item in menu. @" " is a non-item. | 167 // Disable first item in menu. @" " is a non-item. |
| 161 [[expirationYearPopup_ itemAtIndex:0] setEnabled:NO]; | 168 [[expirationYearPopup_ itemAtIndex:0] setEnabled:NO]; |
| 162 } | 169 } |
| 163 | 170 |
| 164 @end | 171 @end |
| 165 | 172 |
| OLD | NEW |