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_CONT
ROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_CONT
ROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_CONT
ROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_CONT
ROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "base/mac/scoped_nsobject.h" |
11 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
12 #include "base/memory/scoped_nsobject.h" | |
13 | 13 |
14 @protocol ConstrainedWindowSheet; | 14 @protocol ConstrainedWindowSheet; |
15 | 15 |
16 // This class manages multiple tab modal sheets for a single parent window. Each | 16 // This class manages multiple tab modal sheets for a single parent window. Each |
17 // tab can have a single sheet and only the active tab's sheet will be visible. | 17 // tab can have a single sheet and only the active tab's sheet will be visible. |
18 // A tab in this case is the |parentView| passed to |-showSheet:forParentView:|. | 18 // A tab in this case is the |parentView| passed to |-showSheet:forParentView:|. |
19 @interface ConstrainedWindowSheetController : NSObject { | 19 @interface ConstrainedWindowSheetController : NSObject { |
20 @private | 20 @private |
21 scoped_nsobject<NSMutableArray> sheets_; | 21 base::scoped_nsobject<NSMutableArray> sheets_; |
22 scoped_nsobject<NSWindow> parentWindow_; | 22 base::scoped_nsobject<NSWindow> parentWindow_; |
23 scoped_nsobject<NSView> activeView_; | 23 base::scoped_nsobject<NSView> activeView_; |
24 } | 24 } |
25 | 25 |
26 // Returns a sheet controller for |parentWindow|. If a sheet controller does not | 26 // Returns a sheet controller for |parentWindow|. If a sheet controller does not |
27 // exist yet then one will be created. | 27 // exist yet then one will be created. |
28 + (ConstrainedWindowSheetController*) | 28 + (ConstrainedWindowSheetController*) |
29 controllerForParentWindow:(NSWindow*)parentWindow; | 29 controllerForParentWindow:(NSWindow*)parentWindow; |
30 | 30 |
31 // Find a controller that's managing the given sheet. If no such controller | 31 // Find a controller that's managing the given sheet. If no such controller |
32 // exists then nil is returned. | 32 // exists then nil is returned. |
33 + (ConstrainedWindowSheetController*) | 33 + (ConstrainedWindowSheetController*) |
(...skipping 21 matching lines...) Expand all Loading... |
55 // Run a pulse animation for the given sheet. This does nothing if the sheet | 55 // Run a pulse animation for the given sheet. This does nothing if the sheet |
56 // is not visible. | 56 // is not visible. |
57 - (void)pulseSheet:(id<ConstrainedWindowSheet>)sheet; | 57 - (void)pulseSheet:(id<ConstrainedWindowSheet>)sheet; |
58 | 58 |
59 // Gets the number of sheets attached to the controller's window. | 59 // Gets the number of sheets attached to the controller's window. |
60 - (int)sheetCount; | 60 - (int)sheetCount; |
61 | 61 |
62 @end | 62 @end |
63 | 63 |
64 #endif // CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_C
ONTROLLER_H_ | 64 #endif // CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_C
ONTROLLER_H_ |
OLD | NEW |