Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / constrained_window / constrained_window_sheet_info.h
blobb72e4f648173f939c61b572f74a5edddaaa2841e
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
16 // public use.
17 @interface ConstrainedWindowSheetInfo : NSObject {
18 @private
19 base::scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_;
20 base::scoped_nsobject<NSView> parentView_;
21 base::scoped_nsobject<NSWindow> overlayWindow_;
22 BOOL sheetDidShow_;
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.
38 - (void)hideSheet;
40 // Shows the sheet and the associated overlay window.
41 - (void)showSheet;
43 @end
45 #endif // CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_INFO_H_