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

Unified Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm

Issue 1495623008: Polish Tabstrip and Overlay Issues in Fullscreen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/constrained_window/constrained_window_sheet_controller.mm
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm
index 0c66e6fb62fce2d60b06661367919a0a5310cbdd..933d0f5ae1c76a4b74315c54b291360b4f4f7fbf 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.mm
@@ -198,6 +198,21 @@ NSRect GetSheetParentBoundsForParentView(NSView* view) {
activeView_.reset();
}
+- (void)hideSheetForFullscreenTransition {
+ if (ConstrainedWindowSheetInfo* sheetInfo =
+ [self findSheetInfoForParentView:activeView_]) {
+ [sheetInfo hideSheet];
+ isSheetHiddenForFullscreen_ = YES;
+ }
+}
+
+- (void)unhideSheetForFullscreenTransition {
+ isSheetHiddenForFullscreen_ = NO;
+ if (ConstrainedWindowSheetInfo* sheetInfo =
+ [self findSheetInfoForParentView:activeView_])
+ [self showSheet:[sheetInfo sheet] forParentView:activeView_];
Robert Sesek 2015/12/04 17:56:30 nit: needs {} since the condition is multi-line
spqchan 2015/12/07 18:27:52 Done.
+}
+
- (NSPoint)originForSheet:(id<ConstrainedWindowSheet>)sheet
withWindowSize:(NSSize)size {
ConstrainedWindowSheetInfo* info = [self findSheetInfoForSheet:sheet];
@@ -267,6 +282,9 @@ NSRect GetSheetParentBoundsForParentView(NSView* view) {
}
- (void)onParentWindowSizeDidChange:(NSNotification*)note {
+ if (isSheetHiddenForFullscreen_)
+ return;
+
[self updateSheetPosition:activeView_];
}

Powered by Google App Engine
This is Rietveld 408576698