| 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 #import "base/auto_reset.h" | 9 #import "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 savedRegularWindow_ = [[self window] retain]; | 535 savedRegularWindow_ = [[self window] retain]; |
| 536 savedRegularWindowFrame_ = [savedRegularWindow_ frame]; | 536 savedRegularWindowFrame_ = [savedRegularWindow_ frame]; |
| 537 | 537 |
| 538 [self moveViewsForImmersiveFullscreen:YES | 538 [self moveViewsForImmersiveFullscreen:YES |
| 539 regularWindow:[self window] | 539 regularWindow:[self window] |
| 540 fullscreenWindow:fullscreenWindow_.get()]; | 540 fullscreenWindow:fullscreenWindow_.get()]; |
| 541 | 541 |
| 542 fullscreen_mac::SlidingStyle style = fullscreen_mac::OMNIBOX_TABS_NONE; | 542 fullscreen_mac::SlidingStyle style = fullscreen_mac::OMNIBOX_TABS_NONE; |
| 543 [self adjustUIForSlidingFullscreenStyle:style]; | 543 [self adjustUIForSlidingFullscreenStyle:style]; |
| 544 | 544 |
| 545 [fullscreenWindow_ display]; |
| 546 |
| 545 // AppKit is helpful and prevents NSWindows from having the same height as | 547 // AppKit is helpful and prevents NSWindows from having the same height as |
| 546 // the screen while the menu bar is showing. This only applies to windows on | 548 // the screen while the menu bar is showing. This only applies to windows on |
| 547 // a secondary screen, in a separate space. Calling [NSWindow | 549 // a secondary screen, in a separate space. Calling [NSWindow |
| 548 // setFrame:display:] with the screen's height will always reduce the | 550 // setFrame:display:] with the screen's height will always reduce the |
| 549 // height by the height of the MenuBar. Calling the method with any other | 551 // height by the height of the MenuBar. Calling the method with any other |
| 550 // height works fine. The relevant method in the 10.10 AppKit SDK is called: | 552 // height works fine. The relevant method in the 10.10 AppKit SDK is called: |
| 551 // _canAdjustSizeForScreensHaveSeparateSpacesIfFillingSecondaryScreen | 553 // _canAdjustSizeForScreensHaveSeparateSpacesIfFillingSecondaryScreen |
| 552 // | 554 // |
| 553 // TODO(erikchen): Refactor the logic to allow the window to be shown after | 555 // TODO(erikchen): Refactor the logic to allow the window to be shown after |
| 554 // the menubar has been hidden. This would remove the need for this hack. | 556 // the menubar has been hidden. This would remove the need for this hack. |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1190 return browser_->tab_strip_model()->GetActiveWebContents(); | 1192 return browser_->tab_strip_model()->GetActiveWebContents(); |
| 1191 } | 1193 } |
| 1192 | 1194 |
| 1193 - (PermissionBubbleManager*)permissionBubbleManager { | 1195 - (PermissionBubbleManager*)permissionBubbleManager { |
| 1194 if (WebContents* contents = [self webContents]) | 1196 if (WebContents* contents = [self webContents]) |
| 1195 return PermissionBubbleManager::FromWebContents(contents); | 1197 return PermissionBubbleManager::FromWebContents(contents); |
| 1196 return nil; | 1198 return nil; |
| 1197 } | 1199 } |
| 1198 | 1200 |
| 1199 @end // @implementation BrowserWindowController(Private) | 1201 @end // @implementation BrowserWindowController(Private) |
| OLD | NEW |