| 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 #import "base/memory/scoped_nsobject.h" | 10 #import "base/memory/scoped_nsobject.h" |
| (...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 // mode, it needs to draw over the bookmark bar and part of the toolbar. | 789 // mode, it needs to draw over the bookmark bar and part of the toolbar. |
| 790 [[infoBarContainerController_ view] removeFromSuperview]; | 790 [[infoBarContainerController_ view] removeFromSuperview]; |
| 791 NSView* infoBarDest = [[self window] contentView]; | 791 NSView* infoBarDest = [[self window] contentView]; |
| 792 [infoBarDest addSubview:[infoBarContainerController_ view] | 792 [infoBarDest addSubview:[infoBarContainerController_ view] |
| 793 positioned:fullscreen ? NSWindowBelow : NSWindowAbove | 793 positioned:fullscreen ? NSWindowBelow : NSWindowAbove |
| 794 relativeTo:fullscreen ? nil | 794 relativeTo:fullscreen ? nil |
| 795 : [toolbarController_ view]]; | 795 : [toolbarController_ view]]; |
| 796 } | 796 } |
| 797 | 797 |
| 798 - (void)showFullscreenExitBubbleIfNecessary { | 798 - (void)showFullscreenExitBubbleIfNecessary { |
| 799 // This method is called in response to |
| 800 // |-updateFullscreenExitBubbleURL:bubbleType:|. If on Lion the system is |
| 801 // transitioning, do not show the bubble because it will cause visual jank |
| 802 // <http://crbug.com/130649>. This will be called again as part of |
| 803 // |-windowDidEnterFullScreen:|, so arrange to do that work then instead. |
| 804 if (enteringFullscreen_) |
| 805 return; |
| 806 |
| 799 [presentationModeController_ ensureOverlayHiddenWithAnimation:NO delay:NO]; | 807 [presentationModeController_ ensureOverlayHiddenWithAnimation:NO delay:NO]; |
| 800 | 808 |
| 801 if (fullscreenBubbleType_ == FEB_TYPE_NONE || | 809 if (fullscreenBubbleType_ == FEB_TYPE_NONE || |
| 802 fullscreenBubbleType_ == FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION) { | 810 fullscreenBubbleType_ == FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION) { |
| 803 // Show no exit instruction bubble on Mac when in Browser Fullscreen. | 811 // Show no exit instruction bubble on Mac when in Browser Fullscreen. |
| 804 [self destroyFullscreenExitBubbleIfNecessary]; | 812 [self destroyFullscreenExitBubbleIfNecessary]; |
| 805 } else { | 813 } else { |
| 806 [fullscreenExitBubbleController_ closeImmediately]; | 814 [fullscreenExitBubbleController_ closeImmediately]; |
| 807 fullscreenExitBubbleController_.reset( | 815 fullscreenExitBubbleController_.reset( |
| 808 [[FullscreenExitBubbleController alloc] | 816 [[FullscreenExitBubbleController alloc] |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 - (void)disableBarVisibilityUpdates { | 922 - (void)disableBarVisibilityUpdates { |
| 915 // Early escape if there's nothing to do. | 923 // Early escape if there's nothing to do. |
| 916 if (!barVisibilityUpdatesEnabled_) | 924 if (!barVisibilityUpdatesEnabled_) |
| 917 return; | 925 return; |
| 918 | 926 |
| 919 barVisibilityUpdatesEnabled_ = NO; | 927 barVisibilityUpdatesEnabled_ = NO; |
| 920 [presentationModeController_ cancelAnimationAndTimers]; | 928 [presentationModeController_ cancelAnimationAndTimers]; |
| 921 } | 929 } |
| 922 | 930 |
| 923 @end // @implementation BrowserWindowController(Private) | 931 @end // @implementation BrowserWindowController(Private) |
| OLD | NEW |