OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_INFO
_H_ | 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_ | 6 #define CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_INFO
_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
11 | 11 |
12 @protocol ConstrainedWindowSheet; | 12 @protocol ConstrainedWindowSheet; |
13 | 13 |
14 // Information about a single sheet managed by | 14 // Information about a single sheet managed by |
15 // ConstrainedWindowSheetController. Note, this is a private class not meant for | 15 // ConstrainedWindowSheetController. Note, this is a private class not meant for |
16 // public use. | 16 // public use. |
17 @interface ConstrainedWindowSheetInfo : NSObject { | 17 @interface ConstrainedWindowSheetInfo : NSObject { |
18 @private | 18 @private |
19 scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_; | 19 base::scoped_nsprotocol<id<ConstrainedWindowSheet>> sheet_; |
20 scoped_nsobject<NSView> parentView_; | 20 base::scoped_nsobject<NSView> parentView_; |
21 scoped_nsobject<NSWindow> overlayWindow_; | 21 base::scoped_nsobject<NSWindow> overlayWindow_; |
22 BOOL sheetDidShow_; | 22 BOOL sheetDidShow_; |
23 } | 23 } |
24 | 24 |
25 @property(nonatomic, readonly) id<ConstrainedWindowSheet> sheet; | 25 @property(nonatomic, readonly) id<ConstrainedWindowSheet> sheet; |
26 @property(nonatomic, readonly) NSView* parentView; | 26 @property(nonatomic, readonly) NSView* parentView; |
27 @property(nonatomic, readonly) NSWindow* overlayWindow; | 27 @property(nonatomic, readonly) NSWindow* overlayWindow; |
28 @property(nonatomic, assign) BOOL sheetDidShow; | 28 @property(nonatomic, assign) BOOL sheetDidShow; |
29 | 29 |
30 // Initializes a info object with for the given |sheet| and associated | 30 // Initializes a info object with for the given |sheet| and associated |
31 // |parentView| and |overlayWindow|. | 31 // |parentView| and |overlayWindow|. |
32 - (id)initWithSheet:(id<ConstrainedWindowSheet>)sheet | 32 - (id)initWithSheet:(id<ConstrainedWindowSheet>)sheet |
33 parentView:(NSView*)parentView | 33 parentView:(NSView*)parentView |
34 overlayWindow:(NSWindow*)overlayWindow; | 34 overlayWindow:(NSWindow*)overlayWindow; |
35 | 35 |
36 // Hides the sheet and the associated overlay window. Hiding is done in such | 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. | 37 // a way as to not disturb the window cycle order. |
38 - (void)hideSheet; | 38 - (void)hideSheet; |
39 | 39 |
40 // Shows the sheet and the associated overlay window. | 40 // Shows the sheet and the associated overlay window. |
41 - (void)showSheet; | 41 - (void)showSheet; |
42 | 42 |
43 @end | 43 @end |
44 | 44 |
45 #endif // CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_I
NFO_H_ | 45 #endif // CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_I
NFO_H_ |
OLD | NEW |