OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_MAIN_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_MAIN_CONTAINER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_MAIN_CONTAINER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_MAIN_CONTAINER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/memory/scoped_nsobject.h" |
11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
| 12 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h" |
12 | 13 |
13 @class AutofillDetailsContainer; | 14 @class AutofillDetailsContainer; |
14 @class AutofillDialogWindowController; | 15 @class AutofillDialogWindowController; |
15 @class AutofillSectionContainer; | 16 @class AutofillSectionContainer; |
16 @class GTMWidthBasedTweaker; | 17 @class GTMWidthBasedTweaker; |
17 | 18 |
18 namespace autofill { | 19 namespace autofill { |
19 class AutofillDialogController; | 20 class AutofillDialogController; |
20 } | 21 } |
21 | 22 |
22 // NSViewController for the main portion of the autofill dialog. Contains | 23 // NSViewController for the main portion of the autofill dialog. Contains |
23 // account chooser, details for current payment instruments, OK/Cancel. | 24 // account chooser, details for current payment instruments, OK/Cancel. |
24 // Might dynamically add and remove other elements. | 25 // Might dynamically add and remove other elements. |
25 @interface AutofillMainContainer : NSViewController { | 26 @interface AutofillMainContainer : NSViewController<AutofillLayout> { |
26 @private | 27 @private |
27 scoped_nsobject<GTMWidthBasedTweaker> buttonContainer_; | 28 scoped_nsobject<GTMWidthBasedTweaker> buttonContainer_; |
28 scoped_nsobject<AutofillDetailsContainer> detailsContainer_; | 29 scoped_nsobject<AutofillDetailsContainer> detailsContainer_; |
29 AutofillDialogWindowController* target_; | 30 AutofillDialogWindowController* target_; |
30 autofill::AutofillDialogController* controller_; // Not owned. | 31 autofill::AutofillDialogController* controller_; // Not owned. |
31 } | 32 } |
32 | 33 |
33 @property(assign, nonatomic) AutofillDialogWindowController* target; | 34 @property(assign, nonatomic) AutofillDialogWindowController* target; |
34 | 35 |
35 // Designated initializer. | 36 // Designated initializer. |
36 - (id)initWithController:(autofill::AutofillDialogController*)controller; | 37 - (id)initWithController:(autofill::AutofillDialogController*)controller; |
37 | 38 |
38 // Returns the view controller responsible for |section|. | 39 // Returns the view controller responsible for |section|. |
39 - (AutofillSectionContainer*)sectionForId:(autofill::DialogSection)section; | 40 - (AutofillSectionContainer*)sectionForId:(autofill::DialogSection)section; |
40 | 41 |
41 // Called when the controller-maintained suggestions model has changed. | 42 // Called when the controller-maintained suggestions model has changed. |
42 - (void)modelChanged; | 43 - (void)modelChanged; |
43 | 44 |
44 @end | 45 @end |
45 | 46 |
46 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_MAIN_CONTAINER_H_ | 47 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_MAIN_CONTAINER_H_ |
OLD | NEW |