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

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

Issue 1495623008: Polish Tabstrip and Overlay Issues in Fullscreen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SSLCertificateViewerCocoaTest fixed 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.h
diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h
index b299d6b395ea8c5d7bc8bd243782baeec75928d9..bd6da1f027bf290374a0f8b3b323cdc68bc4f5dc 100644
--- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h
+++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h
@@ -28,6 +28,10 @@ class WebContentsModalDialogHostCocoa;
base::scoped_nsobject<NSWindow> parentWindow_;
base::scoped_nsobject<NSView> activeView_;
+ // Flag to prevent the sheet from updating its position if it's hidden during
+ // fullscreen. Otherwise, we will get janky movements during the animation.
+ BOOL isSheetHiddenForFullscreen_;
+
// Class that bridges the cross-platform web_modal APIs to the Cocoa sheet
// controller.
scoped_ptr<WebContentsModalDialogHostCocoa> dialogHost_;
@@ -57,6 +61,13 @@ class WebContentsModalDialogHostCocoa;
// Hides a sheet over the active view.
- (void)hideSheet;
+// Hides and unhides the sheet at the beginning and end of fullscreen
+// transition. |hideSheetForFullscreenTransition| gets called at the beginning
+// of the transition and |unhideSheetForFullscreenTransition| gets called at
+// the end.
+- (void)hideSheetForFullscreenTransition;
+- (void)unhideSheetForFullscreenTransition;
+
// Calculates the position of the sheet for the given window size.
- (NSPoint)originForSheet:(id<ConstrainedWindowSheet>)sheet
withWindowSize:(NSSize)size;

Powered by Google App Engine
This is Rietveld 408576698