OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 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_ |
| 7 |
| 8 #import <Cocoa/Cocoa.h> |
| 9 |
| 10 #include "base/memory/scoped_nsobject.h" |
| 11 |
| 12 // Information about a single sheet managed by CWSheetController. |
| 13 @interface ConstrainedWindowSheetInfo : NSObject { |
| 14 scoped_nsobject<NSWindow> sheet_; |
| 15 scoped_nsobject<NSView> parentView_; |
| 16 scoped_nsobject<NSWindow> overlayWindow_; |
| 17 scoped_nsobject<NSAnimation> animation_; |
| 18 NSRect oldSheetFrame_; |
| 19 BOOL oldSheetAutoresizesSubviews_; |
| 20 } |
| 21 |
| 22 // Initializes a info object with for the given |sheet| and associated |
| 23 // |parentView| and |overlayWindow|. |
| 24 - (id)initWithSheet:(NSWindow*)sheet |
| 25 parentView:(NSView*)parentView |
| 26 overlayWindow:(NSWindow*)overlayWindow; |
| 27 |
| 28 - (NSWindow*)sheet; |
| 29 - (NSView*)parentView; |
| 30 - (NSWindow*)overlayWindow; |
| 31 |
| 32 - (void)setAnimation:(NSAnimation*)animation; |
| 33 - (NSAnimation*)animation; |
| 34 |
| 35 // Hides the sheet and the associated overlay window. Hiding is done in such |
| 36 // a way as to not disturb the window cycle order. |
| 37 - (void)hideSheet; |
| 38 |
| 39 // Shows the sheet and the associated overlay window. |
| 40 - (void)showSheet; |
| 41 |
| 42 @end |
| 43 |
| 44 #endif // CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_I
NFO_H_ |
OLD | NEW |