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_PRESENTATION_MODE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 BOOL enteringPresentationMode_; | 38 BOOL enteringPresentationMode_; |
39 | 39 |
40 // Whether or not we are in presentation mode. | 40 // Whether or not we are in presentation mode. |
41 BOOL inPresentationMode_; | 41 BOOL inPresentationMode_; |
42 | 42 |
43 // The tracking area associated with the floating dropdown bar. This tracking | 43 // The tracking area associated with the floating dropdown bar. This tracking |
44 // area is attached to |contentView_|, because when the dropdown is completely | 44 // area is attached to |contentView_|, because when the dropdown is completely |
45 // hidden, we still need to keep a 1px tall tracking area visible. Attaching | 45 // hidden, we still need to keep a 1px tall tracking area visible. Attaching |
46 // to the content view allows us to do this. |trackingArea_| can be nil if | 46 // to the content view allows us to do this. |trackingArea_| can be nil if |
47 // not in presentation mode or during animations. | 47 // not in presentation mode or during animations. |
48 scoped_nsobject<NSTrackingArea> trackingArea_; | 48 base::scoped_nsobject<NSTrackingArea> trackingArea_; |
49 | 49 |
50 // Pointer to the currently running animation. Is nil if no animation is | 50 // Pointer to the currently running animation. Is nil if no animation is |
51 // running. | 51 // running. |
52 scoped_nsobject<DropdownAnimation> currentAnimation_; | 52 base::scoped_nsobject<DropdownAnimation> currentAnimation_; |
53 | 53 |
54 // Timers for scheduled showing/hiding of the bar (which are always done with | 54 // Timers for scheduled showing/hiding of the bar (which are always done with |
55 // animation). | 55 // animation). |
56 scoped_nsobject<NSTimer> showTimer_; | 56 base::scoped_nsobject<NSTimer> showTimer_; |
57 scoped_nsobject<NSTimer> hideTimer_; | 57 base::scoped_nsobject<NSTimer> hideTimer_; |
58 | 58 |
59 // Holds the current bounds of |trackingArea_|, even if |trackingArea_| is | 59 // Holds the current bounds of |trackingArea_|, even if |trackingArea_| is |
60 // currently nil. Used to restore the tracking area when an animation | 60 // currently nil. Used to restore the tracking area when an animation |
61 // completes. | 61 // completes. |
62 NSRect trackingAreaBounds_; | 62 NSRect trackingAreaBounds_; |
63 | 63 |
64 // Tracks the currently requested system fullscreen mode, used to show or hide | 64 // Tracks the currently requested system fullscreen mode, used to show or hide |
65 // the menubar. This should be |kFullScreenModeNormal| when the window is not | 65 // the menubar. This should be |kFullScreenModeNormal| when the window is not |
66 // main or not fullscreen, |kFullScreenModeHideAll| while the overlay is | 66 // main or not fullscreen, |kFullScreenModeHideAll| while the overlay is |
67 // hidden, and |kFullScreenModeHideDock| while the overlay is shown. If the | 67 // hidden, and |kFullScreenModeHideDock| while the overlay is shown. If the |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // effects, such as modifying the system fullscreen mode (menu bar shown state). | 114 // effects, such as modifying the system fullscreen mode (menu bar shown state). |
115 - (void)changeFloatingBarShownFraction:(CGFloat)fraction; | 115 - (void)changeFloatingBarShownFraction:(CGFloat)fraction; |
116 | 116 |
117 @end | 117 @end |
118 | 118 |
119 // Notification posted when we're about to enter or leave fullscreen. | 119 // Notification posted when we're about to enter or leave fullscreen. |
120 extern NSString* const kWillEnterFullscreenNotification; | 120 extern NSString* const kWillEnterFullscreenNotification; |
121 extern NSString* const kWillLeaveFullscreenNotification; | 121 extern NSString* const kWillLeaveFullscreenNotification; |
122 | 122 |
123 #endif // CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_ | 123 #endif // CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_ |
OLD | NEW |