Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 789403002: Rename fullscreen_exit_bubble_* to exclusive_access_bubble_* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac build breaks Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 // |-updateFullscreenExitBubbleURL:bubbleType:|. If we're in the middle of the 606 // |-updateFullscreenExitBubbleURL:bubbleType:|. If we're in the middle of the
607 // transition into fullscreen (i.e., using the AppKit Fullscreen API), do not 607 // transition into fullscreen (i.e., using the AppKit Fullscreen API), do not
608 // show the bubble because it will cause visual jank 608 // show the bubble because it will cause visual jank
609 // (http://crbug.com/130649). This will be called again as part of 609 // (http://crbug.com/130649). This will be called again as part of
610 // |-windowDidEnterFullScreen:|, so arrange to do that work then instead. 610 // |-windowDidEnterFullScreen:|, so arrange to do that work then instead.
611 if (enteringAppKitFullscreen_) 611 if (enteringAppKitFullscreen_)
612 return; 612 return;
613 613
614 [self hideOverlayIfPossibleWithAnimation:NO delay:NO]; 614 [self hideOverlayIfPossibleWithAnimation:NO delay:NO];
615 615
616 if (fullscreenBubbleType_ == FEB_TYPE_NONE || 616 if (exclusiveAccessBubbleType_ == EAB_TYPE_NONE ||
617 fullscreenBubbleType_ == FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION) { 617 exclusiveAccessBubbleType_ ==
618 EAB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION) {
618 // Show no exit instruction bubble on Mac when in Browser Fullscreen. 619 // Show no exit instruction bubble on Mac when in Browser Fullscreen.
619 [self destroyFullscreenExitBubbleIfNecessary]; 620 [self destroyFullscreenExitBubbleIfNecessary];
620 } else { 621 } else {
621 [fullscreenExitBubbleController_ closeImmediately]; 622 [exclusiveAccessBubbleWindowController_ closeImmediately];
622 fullscreenExitBubbleController_.reset( 623 exclusiveAccessBubbleWindowController_.reset(
623 [[FullscreenExitBubbleController alloc] 624 [[ExclusiveAccessBubbleWindowController alloc]
624 initWithOwner:self 625 initWithOwner:self
625 browser:browser_.get() 626 browser:browser_.get()
626 url:fullscreenUrl_ 627 url:fullscreenUrl_
627 bubbleType:fullscreenBubbleType_]); 628 bubbleType:exclusiveAccessBubbleType_]);
628 [fullscreenExitBubbleController_ showWindow]; 629 [exclusiveAccessBubbleWindowController_ showWindow];
629 } 630 }
630 } 631 }
631 632
632 - (void)destroyFullscreenExitBubbleIfNecessary { 633 - (void)destroyFullscreenExitBubbleIfNecessary {
633 [fullscreenExitBubbleController_ closeImmediately]; 634 [exclusiveAccessBubbleWindowController_ closeImmediately];
634 fullscreenExitBubbleController_.reset(); 635 exclusiveAccessBubbleWindowController_.reset();
635 } 636 }
636 637
637 - (void)contentViewDidResize:(NSNotification*)notification { 638 - (void)contentViewDidResize:(NSNotification*)notification {
638 [self layoutSubviews]; 639 [self layoutSubviews];
639 } 640 }
640 641
641 - (void)registerForContentViewResizeNotifications { 642 - (void)registerForContentViewResizeNotifications {
642 [[NSNotificationCenter defaultCenter] 643 [[NSNotificationCenter defaultCenter]
643 addObserver:self 644 addObserver:self
644 selector:@selector(contentViewDidResize:) 645 selector:@selector(contentViewDidResize:)
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 if (!NSIsEmptyRect(output.fullscreenBackingBarFrame)) { 910 if (!NSIsEmptyRect(output.fullscreenBackingBarFrame)) {
910 [floatingBarBackingView_ setFrame:output.fullscreenBackingBarFrame]; 911 [floatingBarBackingView_ setFrame:output.fullscreenBackingBarFrame];
911 [presentationModeController_ 912 [presentationModeController_
912 overlayFrameChanged:output.fullscreenBackingBarFrame]; 913 overlayFrameChanged:output.fullscreenBackingBarFrame];
913 } 914 }
914 915
915 [findBarCocoaController_ 916 [findBarCocoaController_
916 positionFindBarViewAtMaxY:output.findBarMaxY 917 positionFindBarViewAtMaxY:output.findBarMaxY
917 maxWidth:NSWidth(output.contentAreaFrame)]; 918 maxWidth:NSWidth(output.contentAreaFrame)];
918 919
919 [fullscreenExitBubbleController_ 920 [exclusiveAccessBubbleWindowController_
920 positionInWindowAtTop:output.fullscreenExitButtonMaxY 921 positionInWindowAtTop:output.fullscreenExitButtonMaxY
921 width:NSWidth(output.contentAreaFrame)]; 922 width:NSWidth(output.contentAreaFrame)];
922 } 923 }
923 924
924 - (void)updateSubviewZOrder { 925 - (void)updateSubviewZOrder {
925 if ([self isInAnyFullscreenMode]) 926 if ([self isInAnyFullscreenMode])
926 [self updateSubviewZOrderFullscreen]; 927 [self updateSubviewZOrderFullscreen];
927 else 928 else
928 [self updateSubviewZOrderNormal]; 929 [self updateSubviewZOrderNormal];
929 } 930 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 } 1019 }
1019 if (!enteringAppKitFullscreen_) 1020 if (!enteringAppKitFullscreen_)
1020 return NO; 1021 return NO;
1021 if (enteringAppKitFullscreenOnPrimaryScreen_) 1022 if (enteringAppKitFullscreenOnPrimaryScreen_)
1022 return NO; 1023 return NO;
1023 1024
1024 return YES; 1025 return YES;
1025 } 1026 }
1026 1027
1027 @end // @implementation BrowserWindowController(Private) 1028 @end // @implementation BrowserWindowController(Private)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698