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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
8 #import <Cocoa/Cocoa.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"
15 class AutofillDialogViewDelegate;
16 struct DialogOverlayState;
19 @class AutofillMessageView;
21 @interface AutofillOverlayController : NSViewController<AutofillLayout> {
23 // |childView_| contains all overlay UI elements. This is used to fade out
24 // UI elements first, before making the main view transparent to fade out the
26 base::scoped_nsobject<NSView> childView_;
27 base::scoped_nsobject<NSImageView> imageView_;
28 base::scoped_nsobject<AutofillMessageView> messageView_;
30 autofill::AutofillDialogViewDelegate* delegate_; // not owned, owns dialog.
33 // Designated initializer.
34 - (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate;
36 // Updates the state from the dialog controller.
39 // Get the preferred view height for a given width.
40 - (CGFloat)heightForWidth:(int)width;
44 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_