Chromium Code Reviews| 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_]; |
| } |