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_OVERLAY_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_HEADER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_HEADER_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 "base/memory/scoped_ptr.h" | |
12 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h" | 11 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h" |
13 | 12 |
14 namespace autofill { | 13 namespace autofill { |
15 class AutofillDialogViewDelegate; | 14 class AutofillDialogViewDelegate; |
16 struct DialogOverlayState; | |
17 } // autofill | 15 } // autofill |
18 | 16 |
19 @class AutofillMessageView; | 17 @class AutofillAccountChooser; |
20 | 18 |
21 @interface AutofillOverlayController : NSViewController<AutofillLayout> { | 19 @interface AutofillHeader : NSViewController<AutofillLayout> { |
22 @private | 20 @private |
23 base::scoped_nsobject<NSImageView> imageView_; | 21 base::scoped_nsobject<AutofillAccountChooser> accountChooser_; |
24 base::scoped_nsobject<AutofillMessageView> messageView_; | 22 base::scoped_nsobject<NSTextField> title_; |
| 23 // TODO(isherman): Include notifications in the header. |
25 | 24 |
26 autofill::AutofillDialogViewDelegate* delegate_; // not owned, owns dialog. | 25 autofill::AutofillDialogViewDelegate* delegate_; // not owned, owns dialog. |
27 } | 26 } |
28 | 27 |
29 // Designated initializer. | 28 // Designated initializer. |
30 - (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate; | 29 - (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate; |
31 | 30 |
32 // Updates the state from the dialog controller. | 31 // Returns the anchor view for notifications, which is the middle of the account |
33 - (void)updateState; | 32 // chooser view. |
| 33 - (NSView*)anchorView; |
| 34 |
| 35 // Updates the header's state from the dialog controller. |
| 36 - (void)update; |
34 | 37 |
35 // Get the preferred view height for a given width. | 38 // Get the preferred view height for a given width. |
36 - (CGFloat)heightForWidth:(int)width; | 39 - (CGFloat)heightForWidth:(int)width; |
37 | 40 |
38 @end | 41 @end |
39 | 42 |
40 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_ | 43 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_HEADER_H_ |
OLD | NEW |