Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_main_container.h

Issue 21692002: Rename AutofillDialogController to AutofillDialogViewDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/mac/scoped_nsobject.h" 10 #include "base/mac/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 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h"
13 13
14 @class AutofillDetailsContainer; 14 @class AutofillDetailsContainer;
15 @class AutofillDialogWindowController; 15 @class AutofillDialogWindowController;
16 @class AutofillNotificationContainer; 16 @class AutofillNotificationContainer;
17 @class AutofillSectionContainer; 17 @class AutofillSectionContainer;
18 @class GTMWidthBasedTweaker; 18 @class GTMWidthBasedTweaker;
19 @class HyperlinkTextView; 19 @class HyperlinkTextView;
20 20
21 namespace autofill { 21 namespace autofill {
22 class AutofillDialogController; 22 class AutofillDialogViewDelegate;
23 } 23 }
24 24
25 // NSViewController for the main portion of the autofill dialog. Contains 25 // NSViewController for the main portion of the autofill dialog. Contains
26 // account chooser, details for current payment instruments, OK/Cancel. 26 // account chooser, details for current payment instruments, OK/Cancel.
27 // Might dynamically add and remove other elements. 27 // Might dynamically add and remove other elements.
28 @interface AutofillMainContainer : NSViewController<AutofillLayout, 28 @interface AutofillMainContainer : NSViewController<AutofillLayout,
29 NSTextViewDelegate> { 29 NSTextViewDelegate> {
30 @private 30 @private
31 base::scoped_nsobject<GTMWidthBasedTweaker> buttonContainer_; 31 base::scoped_nsobject<GTMWidthBasedTweaker> buttonContainer_;
32 base::scoped_nsobject<NSButton> saveInChromeCheckbox_; 32 base::scoped_nsobject<NSButton> saveInChromeCheckbox_;
33 base::scoped_nsobject<AutofillDetailsContainer> detailsContainer_; 33 base::scoped_nsobject<AutofillDetailsContainer> detailsContainer_;
34 base::scoped_nsobject<HyperlinkTextView> legalDocumentsView_; 34 base::scoped_nsobject<HyperlinkTextView> legalDocumentsView_;
35 base::scoped_nsobject<AutofillNotificationContainer> notificationContainer_; 35 base::scoped_nsobject<AutofillNotificationContainer> notificationContainer_;
36 AutofillDialogWindowController* target_; 36 AutofillDialogWindowController* target_;
37 37
38 // Weak. Owns the dialog. 38 // Weak. Owns the dialog.
39 autofill::AutofillDialogController* controller_; 39 autofill::AutofillDialogViewDelegate* delegate_;
40 40
41 // Preferred size for legal documents. 41 // Preferred size for legal documents.
42 NSSize legalDocumentsSize_; 42 NSSize legalDocumentsSize_;
43 43
44 // Dirty marker for preferred size. 44 // Dirty marker for preferred size.
45 BOOL legalDocumentsSizeDirty_; 45 BOOL legalDocumentsSizeDirty_;
46 } 46 }
47 47
48 @property(assign, nonatomic) AutofillDialogWindowController* target; 48 @property(assign, nonatomic) AutofillDialogWindowController* target;
49 49
50 // Designated initializer. 50 // Designated initializer.
51 - (id)initWithController:(autofill::AutofillDialogController*)controller; 51 - (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate;
52 52
53 // Sets the anchor point for the notificationView_. 53 // Sets the anchor point for the notificationView_.
54 - (void)setAnchorView:(NSView*)anchorView; 54 - (void)setAnchorView:(NSView*)anchorView;
55 55
56 // Returns the view controller responsible for |section|. 56 // Returns the view delegate responsible for |section|.
57 - (AutofillSectionContainer*)sectionForId:(autofill::DialogSection)section; 57 - (AutofillSectionContainer*)sectionForId:(autofill::DialogSection)section;
58 58
59 // Called when the controller-maintained suggestions model has changed. 59 // Called when the delegate-maintained suggestions model has changed.
60 - (void)modelChanged; 60 - (void)modelChanged;
61 61
62 // Get status of "Save in Chrome" checkbox. 62 // Get status of "Save in Chrome" checkbox.
63 - (BOOL)saveDetailsLocally; 63 - (BOOL)saveDetailsLocally;
64 64
65 // Called when the legal documents text might need to be refreshed. 65 // Called when the legal documents text might need to be refreshed.
66 - (void)updateLegalDocuments; 66 - (void)updateLegalDocuments;
67 67
68 // Called when there are changes to the notification area. 68 // Called when there are changes to the notification area.
69 - (void)updateNotificationArea; 69 - (void)updateNotificationArea;
70 70
71 // Validates form input data. 71 // Validates form input data.
72 - (BOOL)validate; 72 - (BOOL)validate;
73 73
74 @end 74 @end
75 75
76 76
77 // AutofillMainContainer helper functions, for testing purposes only. 77 // AutofillMainContainer helper functions, for testing purposes only.
78 @interface AutofillMainContainer (Testing) 78 @interface AutofillMainContainer (Testing)
79 79
80 @property(readonly, nonatomic) NSButton* saveInChromeCheckboxForTesting; 80 @property(readonly, nonatomic) NSButton* saveInChromeCheckboxForTesting;
81 81
82 @end 82 @end
83 83
84 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_MAIN_CONTAINER_H_ 84 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_MAIN_CONTAINER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm ('k') | chrome/browser/ui/cocoa/autofill/autofill_main_container.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698