Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1047)

Unified Diff: chrome/browser/ui/cocoa/presentation_mode_controller.h

Issue 523723002: mac, fullscreen: Several bug fixes after major refactor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new_fullscreen2
Patch Set: More comments from rsesek. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/presentation_mode_controller.h
diff --git a/chrome/browser/ui/cocoa/presentation_mode_controller.h b/chrome/browser/ui/cocoa/presentation_mode_controller.h
index 3f2c295cb460d391cc89c10c920039198fda791e..5427fd2077a87f532925f93de59a9440f7279f6e 100644
--- a/chrome/browser/ui/cocoa/presentation_mode_controller.h
+++ b/chrome/browser/ui/cocoa/presentation_mode_controller.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_
#define CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_
+#include <Carbon/Carbon.h>
#import <Cocoa/Cocoa.h>
#include "base/mac/mac_util.h"
@@ -13,6 +14,14 @@
@class BrowserWindowController;
@class DropdownAnimation;
+namespace fullscreen_mac {
+enum SlidingStyle {
+ OMNIBOX_TABS_PRESENT = 0, // Tab strip and omnibox both visible.
+ OMNIBOX_PRESENT, // Tab strip hidden.
+ OMNIBOX_TABS_HIDDEN, // Tab strip and omnibox both hidden.
+};
+} // namespace fullscreen_mac
+
// TODO(erikchen): This controller is misnamed. It manages the sliding tab
// strip and omnibox in all fullscreen modes.
@@ -74,12 +83,29 @@
// Used to track the current state and make sure we properly restore the menu
// bar when this controller is destroyed.
base::mac::FullScreenMode systemFullscreenMode_;
+
+ // Whether the omnibox is hidden in fullscreen.
+ fullscreen_mac::SlidingStyle slidingStyle_;
+
+ // The fraction of the AppKit Menubar that is showing. Ranges from 0 to 1.
+ // Only used in AppKit Fullscreen.
+ CGFloat menubarFraction_;
+
+ // The fraction of the omnibox/tabstrip that is showing. Ranges from 0 to 1.
+ // Used in both AppKit and Immersive Fullscreen.
+ CGFloat toolbarFraction_;
+
+ // A Carbon event handler that tracks the revealed fraction of the menu bar.
+ EventHandlerRef menuBarTrackingHandler_;
}
@property(readonly, nonatomic) BOOL inPresentationMode;
+@property(nonatomic, assign) fullscreen_mac::SlidingStyle slidingStyle;
+@property(nonatomic, assign) CGFloat toolbarFraction;
// Designated initializer.
-- (id)initWithBrowserController:(BrowserWindowController*)controller;
+- (id)initWithBrowserController:(BrowserWindowController*)controller
+ style:(fullscreen_mac::SlidingStyle)style;
// Informs the controller that the browser has entered or exited presentation
// mode. |-enterPresentationModeForContentView:showDropdown:| should be called
@@ -110,12 +136,10 @@
// 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 system fullscreen mode (menu bar shown state).
-- (void)changeFloatingBarShownFraction:(CGFloat)fraction;
+// In any fullscreen mode, the y offset to use for the content at the top of
+// the screen (tab strip, omnibox, bookmark bar, etc).
+// Ranges from 0 to -22.
+- (CGFloat)menubarOffset;
@end
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.mm ('k') | chrome/browser/ui/cocoa/presentation_mode_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698