| 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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 NSView* infoBarDest = [[self window] contentView]; | 786 NSView* infoBarDest = [[self window] contentView]; |
| 787 [infoBarDest addSubview:[infoBarContainerController_ view] | 787 [infoBarDest addSubview:[infoBarContainerController_ view] |
| 788 positioned:fullscreen ? NSWindowBelow : NSWindowAbove | 788 positioned:fullscreen ? NSWindowBelow : NSWindowAbove |
| 789 relativeTo:fullscreen ? nil | 789 relativeTo:fullscreen ? nil |
| 790 : [toolbarController_ view]]; | 790 : [toolbarController_ view]]; |
| 791 } | 791 } |
| 792 | 792 |
| 793 - (void)showFullscreenExitBubbleIfNecessary { | 793 - (void)showFullscreenExitBubbleIfNecessary { |
| 794 [presentationModeController_ ensureOverlayHiddenWithAnimation:NO delay:NO]; | 794 [presentationModeController_ ensureOverlayHiddenWithAnimation:NO delay:NO]; |
| 795 | 795 |
| 796 [fullscreenExitBubbleController_ closeImmediately]; | 796 if (fullscreenBubbleType_ == FEB_TYPE_NONE || |
| 797 fullscreenExitBubbleController_.reset( | 797 fullscreenBubbleType_ == FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION) { |
| 798 [[FullscreenExitBubbleController alloc] | 798 // Show no exit instruction bubble on Mac when in Browser Fullscreen. |
| 799 initWithOwner:self | 799 [self destroyFullscreenExitBubbleIfNecessary]; |
| 800 browser:browser_.get() | 800 } else { |
| 801 url:fullscreenUrl_ | 801 [fullscreenExitBubbleController_ closeImmediately]; |
| 802 bubbleType:fullscreenBubbleType_]); | 802 fullscreenExitBubbleController_.reset( |
| 803 [fullscreenExitBubbleController_ showWindow]; | 803 [[FullscreenExitBubbleController alloc] |
| 804 initWithOwner:self |
| 805 browser:browser_.get() |
| 806 url:fullscreenUrl_ |
| 807 bubbleType:fullscreenBubbleType_]); |
| 808 [fullscreenExitBubbleController_ showWindow]; |
| 809 } |
| 804 } | 810 } |
| 805 | 811 |
| 806 - (void)destroyFullscreenExitBubbleIfNecessary { | 812 - (void)destroyFullscreenExitBubbleIfNecessary { |
| 807 [fullscreenExitBubbleController_ closeImmediately]; | 813 [fullscreenExitBubbleController_ closeImmediately]; |
| 808 fullscreenExitBubbleController_.reset(); | 814 fullscreenExitBubbleController_.reset(); |
| 809 } | 815 } |
| 810 | 816 |
| 811 - (void)contentViewDidResize:(NSNotification*)notification { | 817 - (void)contentViewDidResize:(NSNotification*)notification { |
| 812 [self layoutSubviews]; | 818 [self layoutSubviews]; |
| 813 } | 819 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 - (void)disableBarVisibilityUpdates { | 909 - (void)disableBarVisibilityUpdates { |
| 904 // Early escape if there's nothing to do. | 910 // Early escape if there's nothing to do. |
| 905 if (!barVisibilityUpdatesEnabled_) | 911 if (!barVisibilityUpdatesEnabled_) |
| 906 return; | 912 return; |
| 907 | 913 |
| 908 barVisibilityUpdatesEnabled_ = NO; | 914 barVisibilityUpdatesEnabled_ = NO; |
| 909 [presentationModeController_ cancelAnimationAndTimers]; | 915 [presentationModeController_ cancelAnimationAndTimers]; |
| 910 } | 916 } |
| 911 | 917 |
| 912 @end // @implementation BrowserWindowController(Private) | 918 @end // @implementation BrowserWindowController(Private) |
| OLD | NEW |