| 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_dialog_controller_mac.h" | 5 #import "chrome/browser/autofill/autofill_dialog_controller_mac.h" |
| 6 #include "app/l10n_util.h" | 6 #include "app/l10n_util.h" |
| 7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/mac_util.h" | 9 #include "base/mac/mac_util.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| 11 #import "chrome/browser/autofill/autofill_address_model_mac.h" | 11 #import "chrome/browser/autofill/autofill_address_model_mac.h" |
| 12 #import "chrome/browser/autofill/autofill_address_sheet_controller_mac.h" | 12 #import "chrome/browser/autofill/autofill_address_sheet_controller_mac.h" |
| 13 #import "chrome/browser/autofill/autofill_credit_card_model_mac.h" | 13 #import "chrome/browser/autofill/autofill_credit_card_model_mac.h" |
| 14 #import "chrome/browser/autofill/autofill_credit_card_sheet_controller_mac.h" | 14 #import "chrome/browser/autofill/autofill_credit_card_sheet_controller_mac.h" |
| 15 #import "chrome/browser/autofill/autofill-inl.h" | 15 #import "chrome/browser/autofill/autofill-inl.h" |
| 16 #import "chrome/browser/autofill/personal_data_manager.h" | 16 #import "chrome/browser/autofill/personal_data_manager.h" |
| 17 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| 18 #import "chrome/browser/ui/cocoa/window_size_autosaver.h" | 18 #import "chrome/browser/ui/cocoa/window_size_autosaver.h" |
| 19 #include "chrome/browser/prefs/pref_service.h" | 19 #include "chrome/browser/prefs/pref_service.h" |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 | 657 |
| 658 | 658 |
| 659 // This is the designated initializer for this class. | 659 // This is the designated initializer for this class. |
| 660 // |profiles| are non-retained immutable list of AutoFill profiles. | 660 // |profiles| are non-retained immutable list of AutoFill profiles. |
| 661 // |creditCards| are non-retained immutable list of credit card info. | 661 // |creditCards| are non-retained immutable list of credit card info. |
| 662 - (id)initWithObserver:(AutoFillDialogObserver*)observer | 662 - (id)initWithObserver:(AutoFillDialogObserver*)observer |
| 663 profile:(Profile*)profile { | 663 profile:(Profile*)profile { |
| 664 DCHECK(profile); | 664 DCHECK(profile); |
| 665 // Use initWithWindowNibPath: instead of initWithWindowNibName: so we | 665 // Use initWithWindowNibPath: instead of initWithWindowNibName: so we |
| 666 // can override it in a unit test. | 666 // can override it in a unit test. |
| 667 NSString* nibpath = [mac_util::MainAppBundle() | 667 NSString* nibpath = [base::mac::MainAppBundle() |
| 668 pathForResource:@"AutoFillDialog" | 668 pathForResource:@"AutoFillDialog" |
| 669 ofType:@"nib"]; | 669 ofType:@"nib"]; |
| 670 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { | 670 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { |
| 671 // Initialize member variables based on input. | 671 // Initialize member variables based on input. |
| 672 observer_ = observer; | 672 observer_ = observer; |
| 673 profile_ = profile; | 673 profile_ = profile; |
| 674 | 674 |
| 675 // Initialize the preference observer and watch kAutoFillEnabled. | 675 // Initialize the preference observer and watch kAutoFillEnabled. |
| 676 preferenceObserver_.reset( | 676 preferenceObserver_.reset( |
| 677 new AutoFillDialogControllerInternal::PreferenceObserver(self)); | 677 new AutoFillDialogControllerInternal::PreferenceObserver(self)); |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 if (!image) { | 932 if (!image) { |
| 933 image = rb.GetNativeImageNamed(IDR_INPUT_GOOD); | 933 image = rb.GetNativeImageNamed(IDR_INPUT_GOOD); |
| 934 DCHECK(image); | 934 DCHECK(image); |
| 935 return image; | 935 return image; |
| 936 } | 936 } |
| 937 | 937 |
| 938 return nil; | 938 return nil; |
| 939 } | 939 } |
| 940 | 940 |
| 941 @end | 941 @end |
| OLD | NEW |