| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/mac/bind_objc_block.h" | 10 #include "base/mac/bind_objc_block.h" |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 savedRegularWindow_ = [[self window] retain]; | 531 savedRegularWindow_ = [[self window] retain]; |
| 532 savedRegularWindowFrame_ = [savedRegularWindow_ frame]; | 532 savedRegularWindowFrame_ = [savedRegularWindow_ frame]; |
| 533 | 533 |
| 534 [self moveViewsForImmersiveFullscreen:YES | 534 [self moveViewsForImmersiveFullscreen:YES |
| 535 regularWindow:[self window] | 535 regularWindow:[self window] |
| 536 fullscreenWindow:fullscreenWindow_.get()]; | 536 fullscreenWindow:fullscreenWindow_.get()]; |
| 537 | 537 |
| 538 fullscreen_mac::SlidingStyle style = fullscreen_mac::OMNIBOX_TABS_HIDDEN; | 538 fullscreen_mac::SlidingStyle style = fullscreen_mac::OMNIBOX_TABS_HIDDEN; |
| 539 [self adjustUIForSlidingFullscreenStyle:style]; | 539 [self adjustUIForSlidingFullscreenStyle:style]; |
| 540 | 540 |
| 541 [fullscreenWindow_ display]; |
| 542 |
| 541 // AppKit is helpful and prevents NSWindows from having the same height as | 543 // AppKit is helpful and prevents NSWindows from having the same height as |
| 542 // the screen while the menu bar is showing. This only applies to windows on | 544 // the screen while the menu bar is showing. This only applies to windows on |
| 543 // a secondary screen, in a separate space. Calling [NSWindow | 545 // a secondary screen, in a separate space. Calling [NSWindow |
| 544 // setFrame:display:] with the screen's height will always reduce the | 546 // setFrame:display:] with the screen's height will always reduce the |
| 545 // height by the height of the MenuBar. Calling the method with any other | 547 // height by the height of the MenuBar. Calling the method with any other |
| 546 // height works fine. The relevant method in the 10.10 AppKit SDK is called: | 548 // height works fine. The relevant method in the 10.10 AppKit SDK is called: |
| 547 // _canAdjustSizeForScreensHaveSeparateSpacesIfFillingSecondaryScreen | 549 // _canAdjustSizeForScreensHaveSeparateSpacesIfFillingSecondaryScreen |
| 548 // | 550 // |
| 549 // TODO(erikchen): Refactor the logic to allow the window to be shown after | 551 // TODO(erikchen): Refactor the logic to allow the window to be shown after |
| 550 // the menubar has been hidden. This would remove the need for this hack. | 552 // the menubar has been hidden. This would remove the need for this hack. |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 return browser_->tab_strip_model()->GetActiveWebContents(); | 1155 return browser_->tab_strip_model()->GetActiveWebContents(); |
| 1154 } | 1156 } |
| 1155 | 1157 |
| 1156 - (PermissionBubbleManager*)permissionBubbleManager { | 1158 - (PermissionBubbleManager*)permissionBubbleManager { |
| 1157 if (WebContents* contents = [self webContents]) | 1159 if (WebContents* contents = [self webContents]) |
| 1158 return PermissionBubbleManager::FromWebContents(contents); | 1160 return PermissionBubbleManager::FromWebContents(contents); |
| 1159 return nil; | 1161 return nil; |
| 1160 } | 1162 } |
| 1161 | 1163 |
| 1162 @end // @implementation BrowserWindowController(Private) | 1164 @end // @implementation BrowserWindowController(Private) |
| OLD | NEW |