| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_WINDOW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_WINDOW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_WINDOW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_WINDOW_CONTROLLER_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 AutofillAccountChooser; | |
| 15 @class AutofillDialogWindowController; | 14 @class AutofillDialogWindowController; |
| 15 @class AutofillHeader; |
| 16 @class AutofillLoadingShieldController; | 16 @class AutofillLoadingShieldController; |
| 17 @class AutofillMainContainer; | 17 @class AutofillMainContainer; |
| 18 @class AutofillOverlayController; | 18 @class AutofillOverlayController; |
| 19 @class AutofillSignInContainer; | 19 @class AutofillSignInContainer; |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 class NavigationController; | 22 class NavigationController; |
| 23 class WebContents; | 23 class WebContents; |
| 24 } // content | 24 } // content |
| 25 | 25 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 50 - (void)onSignInResize:(NSSize)size; | 50 - (void)onSignInResize:(NSSize)size; |
| 51 | 51 |
| 52 @end | 52 @end |
| 53 | 53 |
| 54 | 54 |
| 55 // Window controller for AutofillDialogView. | 55 // Window controller for AutofillDialogView. |
| 56 @interface AutofillDialogWindowController : | 56 @interface AutofillDialogWindowController : |
| 57 NSWindowController<NSWindowDelegate, AutofillLayout, AutofillDialogBridge> { | 57 NSWindowController<NSWindowDelegate, AutofillLayout, AutofillDialogBridge> { |
| 58 @private | 58 @private |
| 59 content::WebContents* webContents_; // weak. | 59 content::WebContents* webContents_; // weak. |
| 60 autofill::AutofillDialogCocoa* autofillDialog_; // weak. | 60 autofill::AutofillDialogCocoa* dialog_; // weak. |
| 61 | 61 |
| 62 base::scoped_nsobject<AutofillHeader> header_; |
| 62 base::scoped_nsobject<AutofillMainContainer> mainContainer_; | 63 base::scoped_nsobject<AutofillMainContainer> mainContainer_; |
| 63 base::scoped_nsobject<AutofillSignInContainer> signInContainer_; | 64 base::scoped_nsobject<AutofillSignInContainer> signInContainer_; |
| 64 base::scoped_nsobject<AutofillAccountChooser> accountChooser_; | |
| 65 base::scoped_nsobject<AutofillOverlayController> overlayController_; | 65 base::scoped_nsobject<AutofillOverlayController> overlayController_; |
| 66 base::scoped_nsobject<AutofillLoadingShieldController> | 66 base::scoped_nsobject<AutofillLoadingShieldController> |
| 67 loadingShieldController_; | 67 loadingShieldController_; |
| 68 base::scoped_nsobject<NSTextField> loadingShieldTextField_; | |
| 69 base::scoped_nsobject<NSTextField> titleTextField_; | |
| 70 base::scoped_nsobject<NSTextView> fieldEditor_; | 68 base::scoped_nsobject<NSTextView> fieldEditor_; |
| 71 } | 69 } |
| 72 | 70 |
| 73 // Designated initializer. The WebContents cannot be NULL. | 71 // Designated initializer. The WebContents cannot be NULL. |
| 74 - (id)initWithWebContents:(content::WebContents*)webContents | 72 - (id)initWithWebContents:(content::WebContents*)webContents |
| 75 autofillDialog:(autofill::AutofillDialogCocoa*)autofillDialog; | 73 dialog:(autofill::AutofillDialogCocoa*)dialog; |
| 76 | 74 |
| 77 // Requests a re-layout for the entire dialog. The layout will be postponed | 75 // Requests a re-layout for the entire dialog. The layout will be postponed |
| 78 // until the next cycle of the runloop. | 76 // until the next cycle of the runloop. |
| 79 - (void)requestRelayout; | 77 - (void)requestRelayout; |
| 80 | 78 |
| 81 // Cancels all previous requests to re-layout. | 79 // Cancels all previous requests to re-layout. |
| 82 - (void)cancelRelayout; | 80 - (void)cancelRelayout; |
| 83 | 81 |
| 84 // Validate data. If it is valid, notify the delegate that the user would | 82 // Validate data. If it is valid, notify the delegate that the user would |
| 85 // like to use the data. | 83 // like to use the data. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 98 forInput:(const autofill::DetailInput&)input; | 96 forInput:(const autofill::DetailInput&)input; |
| 99 - (void)setTextContents:(NSString*)text | 97 - (void)setTextContents:(NSString*)text |
| 100 ofSuggestionForSection:(autofill::DialogSection)section; | 98 ofSuggestionForSection:(autofill::DialogSection)section; |
| 101 - (void)activateFieldForInput:(const autofill::DetailInput&)input; | 99 - (void)activateFieldForInput:(const autofill::DetailInput&)input; |
| 102 - (content::WebContents*)getSignInWebContents; | 100 - (content::WebContents*)getSignInWebContents; |
| 103 - (BOOL)isShowingOverlay; | 101 - (BOOL)isShowingOverlay; |
| 104 | 102 |
| 105 @end | 103 @end |
| 106 | 104 |
| 107 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_WINDOW_CONTROLLER_H_ | 105 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_WINDOW_CONTROLLER_H_ |
| OLD | NEW |