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

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

Issue 1276383004: Implemented fullscreen exit animation with AppKit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed some whitespace issues Created 5 years, 4 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/framed_browser_window.mm
diff --git a/chrome/browser/ui/cocoa/framed_browser_window.mm b/chrome/browser/ui/cocoa/framed_browser_window.mm
index 5d098be8d3c00a47cd7a24ab4c2703c7ba498748..1eede2ac6e89b9b31c88a4f1a795a8ca2565c4fd 100644
--- a/chrome/browser/ui/cocoa/framed_browser_window.mm
+++ b/chrome/browser/ui/cocoa/framed_browser_window.mm
@@ -102,6 +102,24 @@ const CGFloat kWindowGradientHeight = 24.0;
return self;
}
+// Overriding this method to prevent the OSX from automatically setting
+// the style mask
+- (void)setStyleMask:(NSUInteger)styleMask {
+ if (frameAndStyleLock_) {
+ return;
+ }
+ [super setStyleMask:styleMask];
+}
+
+// Overriding this method to prevent the OSX from automatically setting
+// the frame
+- (void)setFrame:(NSRect)frameRect display:(BOOL)flag animate:(BOOL)animateFlag {
+ if (frameAndStyleLock_) {
+ return;
+ }
+ [super setFrame:frameRect display:flag animate:animateFlag];
+}
+
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
@@ -177,6 +195,12 @@ const CGFloat kWindowGradientHeight = 24.0;
shouldHideTitle_ = flag;
}
+// This method sets a lock which prevents the the frame and style
+// of the window to be changed
+- (void) setFrameAndStyleLock:(BOOL)lock {
+ frameAndStyleLock_ = lock;
+}
+
- (BOOL)_isTitleHidden {
return shouldHideTitle_;
}

Powered by Google App Engine
This is Rietveld 408576698