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_address_sheet_controller_mac.h" | 5 #import "chrome/browser/autofill/autofill_address_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/mac_util.h" |
9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
10 #import "chrome/browser/autofill/autofill_address_model_mac.h" | 10 #import "chrome/browser/autofill/autofill_address_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/autofill_profile.h" | 12 #include "chrome/browser/autofill/autofill_profile.h" |
13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
14 | 14 |
15 @implementation AutoFillAddressSheetController | 15 @implementation AutoFillAddressSheetController |
16 | 16 |
17 @synthesize addressModel = addressModel_; | 17 @synthesize addressModel = addressModel_; |
18 | 18 |
19 - (id)initWithProfile:(const AutoFillProfile&)profile | 19 - (id)initWithProfile:(const AutoFillProfile&)profile |
20 mode:(AutoFillAddressMode)mode { | 20 mode:(AutoFillAddressMode)mode { |
21 NSString* nibPath = [mac_util::MainAppBundle() | 21 NSString* nibPath = [base::mac::MainAppBundle() |
22 pathForResource:@"AutoFillAddressSheet" | 22 pathForResource:@"AutoFillAddressSheet" |
23 ofType:@"nib"]; | 23 ofType:@"nib"]; |
24 self = [super initWithWindowNibPath:nibPath owner:self]; | 24 self = [super initWithWindowNibPath:nibPath owner:self]; |
25 if (self) { | 25 if (self) { |
26 // Create the model. | 26 // Create the model. |
27 [self setAddressModel:[[[AutoFillAddressModel alloc] | 27 [self setAddressModel:[[[AutoFillAddressModel alloc] |
28 initWithProfile:profile] autorelease]]; | 28 initWithProfile:profile] autorelease]]; |
29 | 29 |
30 mode_ = mode; | 30 mode_ = mode; |
31 } | 31 } |
(...skipping 25 matching lines...) Expand all Loading... |
57 | 57 |
58 - (IBAction)cancel:(id)sender { | 58 - (IBAction)cancel:(id)sender { |
59 [NSApp endSheet:[self window] returnCode:0]; | 59 [NSApp endSheet:[self window] returnCode:0]; |
60 } | 60 } |
61 | 61 |
62 - (void)copyModelToProfile:(AutoFillProfile*)profile { | 62 - (void)copyModelToProfile:(AutoFillProfile*)profile { |
63 [addressModel_ copyModelToProfile:profile]; | 63 [addressModel_ copyModelToProfile:profile]; |
64 } | 64 } |
65 | 65 |
66 @end | 66 @end |
OLD | NEW |