- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / cocoa / autofill / autofill_overlay_controller.h
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.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h"
12 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h"
13
14 namespace autofill {
15 class AutofillDialogViewDelegate;
16 struct DialogOverlayState;
17 }  // autofill
18
19 @class AutofillMessageView;
20
21 @interface AutofillOverlayController : NSViewController<AutofillLayout> {
22  @private
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
25   // overlay shield.
26   base::scoped_nsobject<NSView> childView_;
27   base::scoped_nsobject<NSImageView> imageView_;
28   base::scoped_nsobject<AutofillMessageView> messageView_;
29
30   autofill::AutofillDialogViewDelegate* delegate_;  // not owned, owns dialog.
31 }
32
33 // Designated initializer.
34 - (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate;
35
36 // Updates the state from the dialog controller.
37 - (void)updateState;
38
39 // Get the preferred view height for a given width.
40 - (CGFloat)heightForWidth:(int)width;
41
42 @end
43
44 #endif  // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_OVERLAY_CONTROLLER_H_
45