| 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_;
|
| }
|
|
|