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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 545643002: mac: Add basic layout unit test for fullscreen transition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/browser_window_controller_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index 6ffb2ca5ebe248c5932e4db0a79fea4b9b7a256d..f0e0aa3adea7c35a04356cc186dfb6c3b551f731 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -302,9 +302,6 @@ willPositionSheet:(NSWindow*)sheet
return 0;
CGFloat totalHeight = 0;
- if (presentationModeController_)
- totalHeight = [presentationModeController_ floatingBarVerticalOffset];
-
if ([self hasTabStrip])
totalHeight += NSHeight([[self tabStripView] frame]);
@@ -730,8 +727,7 @@ willPositionSheet:(NSWindow*)sheet
- (void)adjustUIForSlidingFullscreenStyle:(fullscreen_mac::SlidingStyle)style {
if (!presentationModeController_) {
presentationModeController_.reset(
- [[PresentationModeController alloc] initWithBrowserController:self
- style:style]);
+ [self newPresentationModeControllerWithStyle:style]);
[self configurePresentationModeController];
} else {
presentationModeController_.get().slidingStyle = style;
@@ -750,6 +746,12 @@ willPositionSheet:(NSWindow*)sheet
[self layoutSubviews];
}
+- (PresentationModeController*)newPresentationModeControllerWithStyle:
+ (fullscreen_mac::SlidingStyle)style {
+ return [[PresentationModeController alloc] initWithBrowserController:self
+ style:style];
+}
+
- (void)enterImmersiveFullscreen {
// Set to NO by |-windowDidEnterFullScreen:|.
enteringImmersiveFullscreen_ = YES;
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.h ('k') | chrome/browser/ui/cocoa/presentation_mode_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698