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_DIALOG_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_ |
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_ |
7 | 7 |
8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
12 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" | 12 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" |
13 #include "chrome/browser/ui/autofill/testable_autofill_dialog_view.h" | 13 #include "chrome/browser/ui/autofill/testable_autofill_dialog_view.h" |
14 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h" | 14 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h" |
15 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h" | 15 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h" |
16 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 class NavigationController; | 19 class NavigationController; |
20 } | 20 } |
21 | 21 |
22 namespace autofill { | 22 namespace autofill { |
23 class AutofillDialogViewDelegate; | 23 class AutofillDialogViewDelegate; |
24 } | 24 } |
25 | 25 |
26 @class AutofillAccountChooser; | |
27 @class AutofillDialogWindowController; | 26 @class AutofillDialogWindowController; |
| 27 @class AutofillHeader; |
28 @class AutofillMainContainer; | 28 @class AutofillMainContainer; |
29 @class AutofillOverlayController; | 29 @class AutofillOverlayController; |
30 @class AutofillSignInContainer; | 30 @class AutofillSignInContainer; |
31 | 31 |
32 namespace autofill { | 32 namespace autofill { |
33 | 33 |
34 class AutofillDialogCocoa : public AutofillDialogView, | 34 class AutofillDialogCocoa : public AutofillDialogView, |
35 public TestableAutofillDialogView, | 35 public TestableAutofillDialogView, |
36 public ConstrainedWindowMacDelegate { | 36 public ConstrainedWindowMacDelegate { |
37 public: | 37 public: |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // The delegate |this| queries for logic and state. | 103 // The delegate |this| queries for logic and state. |
104 AutofillDialogViewDelegate* delegate_; | 104 AutofillDialogViewDelegate* delegate_; |
105 }; | 105 }; |
106 | 106 |
107 } // autofill | 107 } // autofill |
108 | 108 |
109 @interface AutofillDialogWindowController : | 109 @interface AutofillDialogWindowController : |
110 NSWindowController<NSWindowDelegate, AutofillLayout> { | 110 NSWindowController<NSWindowDelegate, AutofillLayout> { |
111 @private | 111 @private |
112 content::WebContents* webContents_; // weak. | 112 content::WebContents* webContents_; // weak. |
113 autofill::AutofillDialogCocoa* autofillDialog_; // weak. | 113 autofill::AutofillDialogCocoa* dialog_; // weak. |
114 | 114 |
| 115 base::scoped_nsobject<AutofillHeader> header_; |
115 base::scoped_nsobject<AutofillMainContainer> mainContainer_; | 116 base::scoped_nsobject<AutofillMainContainer> mainContainer_; |
116 base::scoped_nsobject<AutofillSignInContainer> signInContainer_; | 117 base::scoped_nsobject<AutofillSignInContainer> signInContainer_; |
117 base::scoped_nsobject<AutofillAccountChooser> accountChooser_; | |
118 base::scoped_nsobject<AutofillOverlayController> overlayController_; | 118 base::scoped_nsobject<AutofillOverlayController> overlayController_; |
119 base::scoped_nsobject<NSTextField> loadingShieldTextField_; | 119 base::scoped_nsobject<NSTextField> loadingShieldTextField_; |
120 base::scoped_nsobject<NSTextField> titleTextField_; | |
121 base::scoped_nsobject<NSTextView> fieldEditor_; | 120 base::scoped_nsobject<NSTextView> fieldEditor_; |
122 } | 121 } |
123 | 122 |
124 // Designated initializer. The WebContents cannot be NULL. | 123 // Designated initializer. The WebContents cannot be NULL. |
125 - (id)initWithWebContents:(content::WebContents*)webContents | 124 - (id)initWithWebContents:(content::WebContents*)webContents |
126 autofillDialog:(autofill::AutofillDialogCocoa*)autofillDialog; | 125 dialog:(autofill::AutofillDialogCocoa*)dialog; |
127 | 126 |
128 // A child view request re-layouting. | 127 // A child view request re-layouting. |
129 - (void)requestRelayout; | 128 - (void)requestRelayout; |
130 | 129 |
131 // Cancels all previous requests to re-layout. | 130 // Cancels all previous requests to re-layout. |
132 - (void)cancelRelayout; | 131 - (void)cancelRelayout; |
133 | 132 |
134 // Validate data. If it is valid, notify the delegate that the user would | 133 // Validate data. If it is valid, notify the delegate that the user would |
135 // like to use the data. | 134 // like to use the data. |
136 - (IBAction)accept:(id)sender; | 135 - (IBAction)accept:(id)sender; |
(...skipping 30 matching lines...) Expand all Loading... |
167 forInput:(const autofill::DetailInput&)input; | 166 forInput:(const autofill::DetailInput&)input; |
168 - (void)setTextContents:(NSString*)text | 167 - (void)setTextContents:(NSString*)text |
169 ofSuggestionForSection:(autofill::DialogSection)section; | 168 ofSuggestionForSection:(autofill::DialogSection)section; |
170 - (void)activateFieldForInput:(const autofill::DetailInput&)input; | 169 - (void)activateFieldForInput:(const autofill::DetailInput&)input; |
171 - (content::WebContents*)getSignInWebContents; | 170 - (content::WebContents*)getSignInWebContents; |
172 - (BOOL)IsShowingOverlay; | 171 - (BOOL)IsShowingOverlay; |
173 | 172 |
174 @end | 173 @end |
175 | 174 |
176 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_ | 175 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_ |
OLD | NEW |