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 AutofillDialogWindowController; | |
15 @class AutofillHeader; | 14 @class AutofillHeader; |
16 @class AutofillLoadingShieldController; | 15 @class AutofillLoadingShieldController; |
17 @class AutofillMainContainer; | 16 @class AutofillMainContainer; |
18 @class AutofillOverlayController; | 17 @class AutofillOverlayController; |
19 @class AutofillSignInContainer; | 18 @class AutofillSignInContainer; |
20 | 19 |
21 namespace content { | 20 namespace content { |
22 class NavigationController; | 21 class NavigationController; |
23 class WebContents; | 22 class WebContents; |
24 } // content | 23 } // content |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 68 } |
70 | 69 |
71 // Designated initializer. The WebContents cannot be NULL. | 70 // Designated initializer. The WebContents cannot be NULL. |
72 - (id)initWithWebContents:(content::WebContents*)webContents | 71 - (id)initWithWebContents:(content::WebContents*)webContents |
73 dialog:(autofill::AutofillDialogCocoa*)dialog; | 72 dialog:(autofill::AutofillDialogCocoa*)dialog; |
74 | 73 |
75 // Requests a re-layout for the entire dialog. The layout will be postponed | 74 // Requests a re-layout for the entire dialog. The layout will be postponed |
76 // until the next cycle of the runloop. | 75 // until the next cycle of the runloop. |
77 - (void)requestRelayout; | 76 - (void)requestRelayout; |
78 | 77 |
79 // Cancels all previous requests to re-layout. | |
80 - (void)cancelRelayout; | |
81 | |
82 // Validate data. If it is valid, notify the delegate that the user would | 78 // Validate data. If it is valid, notify the delegate that the user would |
83 // like to use the data. | 79 // like to use the data. |
84 - (IBAction)accept:(id)sender; | 80 - (IBAction)accept:(id)sender; |
85 | 81 |
86 // User canceled the dialog. | 82 // User canceled the dialog. |
87 - (IBAction)cancel:(id)sender; | 83 - (IBAction)cancel:(id)sender; |
88 | 84 |
89 @end | 85 @end |
90 | 86 |
91 | 87 |
92 // Mirrors the TestableAutofillDialogView API on the C++ side. | 88 // Mirrors the TestableAutofillDialogView API on the C++ side. |
93 @interface AutofillDialogWindowController (TestableAutofillDialogView) | 89 @interface AutofillDialogWindowController (TestableAutofillDialogView) |
94 | 90 |
95 - (void)setTextContents:(NSString*)text | 91 - (void)setTextContents:(NSString*)text |
96 forInput:(const autofill::DetailInput&)input; | 92 forInput:(const autofill::DetailInput&)input; |
97 - (void)setTextContents:(NSString*)text | 93 - (void)setTextContents:(NSString*)text |
98 ofSuggestionForSection:(autofill::DialogSection)section; | 94 ofSuggestionForSection:(autofill::DialogSection)section; |
99 - (void)activateFieldForInput:(const autofill::DetailInput&)input; | 95 - (void)activateFieldForInput:(const autofill::DetailInput&)input; |
100 - (content::WebContents*)getSignInWebContents; | 96 - (content::WebContents*)getSignInWebContents; |
101 - (BOOL)isShowingOverlay; | 97 - (BOOL)isShowingOverlay; |
102 | 98 |
103 @end | 99 @end |
104 | 100 |
105 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_WINDOW_CONTROLLER_H_ | 101 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_WINDOW_CONTROLLER_H_ |
OLD | NEW |