summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/fullscreen_controller.h
diff options
context:
space:
mode:
authorrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-03 19:27:28 +0000
committerrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-03 19:27:28 +0000
commitce04f0c9b299f5afbc6a44839f302baabe498cd1 (patch)
tree83b7b5fb2b88a95930d7a2d9360b7b2427567bb7 /chrome/browser/cocoa/fullscreen_controller.h
parentea2cad155442906261ce832585a36630c6f10d98 (diff)
downloadchromium_src-ce04f0c9b299f5afbc6a44839f302baabe498cd1.zip
chromium_src-ce04f0c9b299f5afbc6a44839f302baabe498cd1.tar.gz
chromium_src-ce04f0c9b299f5afbc6a44839f302baabe498cd1.tar.bz2
[Mac] When in fullscreen mode, ties the menubar shown state to the overlay shown state.
BUG=36610 TEST=Go fullscreen. Menubar should only be shown when the overlay is fully visible. TEST=While in fullscreen mode, fullscreen a youtube video. Menubar should be autohidden (mousing to the top of the screen should show it). Review URL: http://codereview.chromium.org/661380 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40529 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/fullscreen_controller.h')
-rw-r--r--chrome/browser/cocoa/fullscreen_controller.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/chrome/browser/cocoa/fullscreen_controller.h b/chrome/browser/cocoa/fullscreen_controller.h
index 1fda1d7..f599835 100644
--- a/chrome/browser/cocoa/fullscreen_controller.h
+++ b/chrome/browser/cocoa/fullscreen_controller.h
@@ -8,6 +8,7 @@
#import <Cocoa/Cocoa.h>
#import "base/cocoa_protocols_mac.h"
+#include "base/mac_util.h"
#include "chrome/browser/cocoa/location_bar_view_mac.h"
@class BrowserWindowController;
@@ -57,12 +58,15 @@
// completes.
NSRect trackingAreaBounds_;
- // YES if we are currently hiding the menubar. While this should generally
- // match the window's main status, it can get out of sync if we miss a
- // notification (which can happen when a fullscreen window is closed). Used
- // to make sure we properly restore the menubar when this controller is
+ // Tracks the currently requested fullscreen mode. This should be
+ // |kFullScreenModeNormal| when the window is not main or not fullscreen,
+ // |kFullScreenModeHideAll| while the overlay is hidden, and
+ // |kFullScreenModeHideDock| while the overlay is shown. This value can get
+ // out of sync with the correct state if we miss a notification (which can
+ // happen when a fullscreen window is closed). Used to track the current
+ // state and make sure we properly restore the menubar when this controller is
// destroyed.
- BOOL menubarIsHidden_;
+ mac_util::FullScreenMode currentFullscreenMode_;
}
@property(readonly, nonatomic) BOOL isFullscreen;
@@ -96,6 +100,13 @@
// Cancels any running animation and timers.
- (void)cancelAnimationAndTimers;
+// Gets the current floating bar shown fraction.
+- (CGFloat)floatingBarShownFraction;
+
+// Sets a new current floating bar shown fraction. NOTE: This function has side
+// effects, such as modifying the fullscreen mode (menubar shown state).
+- (void)changeFloatingBarShownFraction:(CGFloat)fraction;
+
@end
#endif // CHROME_BROWSER_COCOA_FULLSCREEN_CONTROLLER_H_