1 // Copyright (c) 2012 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_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_INFO_H_
6 #define CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_INFO_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_nsobject.h"
12 @protocol ConstrainedWindowSheet
;
14 // Information about a single sheet managed by
15 // ConstrainedWindowSheetController. Note, this is a private class not meant for
17 @interface ConstrainedWindowSheetInfo
: NSObject
{
19 base::scoped_nsprotocol
<id
<ConstrainedWindowSheet
>> sheet_
;
20 base::scoped_nsobject
<NSView
> parentView_
;
21 base::scoped_nsobject
<NSWindow
> overlayWindow_
;
25 @
property(nonatomic
, readonly
) id
<ConstrainedWindowSheet
> sheet
;
26 @
property(nonatomic
, readonly
) NSView
* parentView
;
27 @
property(nonatomic
, readonly
) NSWindow
* overlayWindow
;
28 @
property(nonatomic
, assign
) BOOL sheetDidShow
;
30 // Initializes a info object with for the given |sheet| and associated
31 // |parentView| and |overlayWindow|.
32 - (id
)initWithSheet
:(id
<ConstrainedWindowSheet
>)sheet
33 parentView
:(NSView
*)parentView
34 overlayWindow
:(NSWindow
*)overlayWindow
;
36 // Hides the sheet and the associated overlay window. Hiding is done in such
37 // a way as to not disturb the window cycle order.
40 // Shows the sheet and the associated overlay window.
45 #endif // CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_INFO_H_