Chromium Code Reviews| 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..657cd3070db8c54be4453f39514002b6754762fe 100644 |
| --- a/chrome/browser/ui/cocoa/framed_browser_window.mm |
| +++ b/chrome/browser/ui/cocoa/framed_browser_window.mm |
| @@ -102,6 +102,26 @@ const CGFloat kWindowGradientHeight = 24.0; |
| return self; |
| } |
| +// Overriding this method to prevent the OSX from automatically setting |
|
erikchen
2015/08/10 18:06:26
grammar.
This method is overridden to prevent App
spqchan1
2015/08/11 21:43:48
Done.
|
| +// the style mask |
| +- (void)setStyleMask:(NSUInteger)styleMask { |
|
erikchen
2015/08/10 18:06:26
reformat this method to meet Chrome style guidelin
spqchan1
2015/08/11 21:43:48
ditto to below.
|
| + if (frameAndStyleLock_) { |
| + return; |
|
erikchen
2015/08/10 18:06:25
This is, in general, a very dangerous operation. I
spqchan1
2015/08/11 21:43:48
Done.
|
| + } |
| + [super setStyleMask:styleMask]; |
| +} |
| + |
| +// Overriding this method to prevent the OSX from automatically setting |
|
erikchen
2015/08/10 18:06:26
ditto
spqchan1
2015/08/11 21:43:48
Done.
|
| +// the frame |
| +- (void)setFrame:(NSRect)frameRect |
| + display:(BOOL)flag |
| + animate:(BOOL)animateFlag { |
|
erikchen
2015/08/10 18:06:26
reformat this method to meet Chrome style guidelin
spqchan1
2015/08/11 21:43:48
I moved the overriden methods to the top. I'm conf
erikchen
2015/08/11 22:42:54
The rest of the method is formatted incorrectly. T
spqchan1
2015/08/12 19:34:41
Done. Removed the curly brace
|
| + if (frameAndStyleLock_) { |
| + return; |
| + } |
| + [super setFrame:frameRect display:flag animate:animateFlag]; |
| +} |
| + |
| - (void)dealloc { |
| [[NSNotificationCenter defaultCenter] removeObserver:self]; |
| [super dealloc]; |
| @@ -177,6 +197,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 { |
|
erikchen
2015/08/10 18:06:26
run "git cl format" to clang-format your entire CL
spqchan1
2015/08/11 21:43:48
Done. This is magical
|
| + frameAndStyleLock_ = lock; |
| +} |
| + |
| - (BOOL)_isTitleHidden { |
| return shouldHideTitle_; |
| } |