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 16 matching lines...) Expand all Loading... |
27 #import "chrome/browser/ui/cocoa/custom_frame_view.h" | 27 #import "chrome/browser/ui/cocoa/custom_frame_view.h" |
28 #import "chrome/browser/ui/cocoa/dev_tools_controller.h" | 28 #import "chrome/browser/ui/cocoa/dev_tools_controller.h" |
29 #import "chrome/browser/ui/cocoa/fast_resize_view.h" | 29 #import "chrome/browser/ui/cocoa/fast_resize_view.h" |
30 #import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h" | 30 #import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h" |
31 #import "chrome/browser/ui/cocoa/floating_bar_backing_view.h" | 31 #import "chrome/browser/ui/cocoa/floating_bar_backing_view.h" |
32 #import "chrome/browser/ui/cocoa/framed_browser_window.h" | 32 #import "chrome/browser/ui/cocoa/framed_browser_window.h" |
33 #include "chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h" | 33 #include "chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h" |
34 #import "chrome/browser/ui/cocoa/fullscreen_window.h" | 34 #import "chrome/browser/ui/cocoa/fullscreen_window.h" |
35 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" | 35 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" |
36 #include "chrome/browser/ui/cocoa/last_active_browser_cocoa.h" | 36 #include "chrome/browser/ui/cocoa/last_active_browser_cocoa.h" |
37 #import "chrome/browser/ui/cocoa/presentation_mode_controller.h" | 37 #import "chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h" |
38 #import "chrome/browser/ui/cocoa/profiles/avatar_button_controller.h" | 38 #import "chrome/browser/ui/cocoa/profiles/avatar_button_controller.h" |
39 #import "chrome/browser/ui/cocoa/profiles/avatar_icon_controller.h" | 39 #import "chrome/browser/ui/cocoa/profiles/avatar_icon_controller.h" |
40 #import "chrome/browser/ui/cocoa/status_bubble_mac.h" | 40 #import "chrome/browser/ui/cocoa/status_bubble_mac.h" |
41 #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h" | 41 #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h" |
42 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" | 42 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" |
43 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" | 43 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" |
44 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" | 44 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" |
45 #import "chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h" | 45 #import "chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h" |
46 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" | 46 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" |
47 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 47 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 return; | 343 return; |
344 | 344 |
345 toolbarFrame.size.height = newHeight; | 345 toolbarFrame.size.height = newHeight; |
346 NSRect bookmarkFrame = [[bookmarkBarController_ view] frame]; | 346 NSRect bookmarkFrame = [[bookmarkBarController_ view] frame]; |
347 bookmarkFrame.size.height = bookmarkFrame.size.height - deltaH; | 347 bookmarkFrame.size.height = bookmarkFrame.size.height - deltaH; |
348 [[toolbarController_ view] setFrame:toolbarFrame]; | 348 [[toolbarController_ view] setFrame:toolbarFrame]; |
349 [[bookmarkBarController_ view] setFrame:bookmarkFrame]; | 349 [[bookmarkBarController_ view] setFrame:bookmarkFrame]; |
350 [self layoutSubviews]; | 350 [self layoutSubviews]; |
351 } | 351 } |
352 | 352 |
353 // Fullscreen and presentation mode methods | 353 // Fullscreen methods |
354 | 354 |
355 - (void)moveViewsForImmersiveFullscreen:(BOOL)fullscreen | 355 - (void)moveViewsForImmersiveFullscreen:(BOOL)fullscreen |
356 regularWindow:(NSWindow*)regularWindow | 356 regularWindow:(NSWindow*)regularWindow |
357 fullscreenWindow:(NSWindow*)fullscreenWindow { | 357 fullscreenWindow:(NSWindow*)fullscreenWindow { |
358 NSWindow* sourceWindow = fullscreen ? regularWindow : fullscreenWindow; | 358 NSWindow* sourceWindow = fullscreen ? regularWindow : fullscreenWindow; |
359 NSWindow* destWindow = fullscreen ? fullscreenWindow : regularWindow; | 359 NSWindow* destWindow = fullscreen ? fullscreenWindow : regularWindow; |
360 | 360 |
361 // Close the bookmark bubble, if it's open. Use |-ok:| instead of |-cancel:| | 361 // Close the bookmark bubble, if it's open. Use |-ok:| instead of |-cancel:| |
362 // or |-close| because that matches the behavior when the bubble loses key | 362 // or |-close| because that matches the behavior when the bubble loses key |
363 // status. | 363 // status. |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 - (void)permissionBubbleWindowWillClose:(NSNotification*)notification { | 454 - (void)permissionBubbleWindowWillClose:(NSNotification*)notification { |
455 NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; | 455 NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; |
456 [center removeObserver:self | 456 [center removeObserver:self |
457 name:NSWindowWillCloseNotification | 457 name:NSWindowWillCloseNotification |
458 object:[notification object]]; | 458 object:[notification object]]; |
459 [self releaseBarVisibilityForOwner:[notification object] | 459 [self releaseBarVisibilityForOwner:[notification object] |
460 withAnimation:YES | 460 withAnimation:YES |
461 delay:YES]; | 461 delay:YES]; |
462 } | 462 } |
463 | 463 |
464 - (void)configurePresentationModeController { | 464 - (void)configureFullscreenToolbarController { |
465 BOOL fullscreenForTab = [self isFullscreenForTabContentOrExtension]; | 465 BOOL fullscreenForTab = [self isFullscreenForTabContentOrExtension]; |
466 BOOL kioskMode = | 466 BOOL kioskMode = |
467 base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode); | 467 base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode); |
468 BOOL showDropdown = | 468 BOOL showDropdown = |
469 !fullscreenForTab && !kioskMode && ([self floatingBarHasFocus]); | 469 !fullscreenForTab && !kioskMode && ([self floatingBarHasFocus]); |
470 | 470 |
471 PermissionBubbleManager* manager = [self permissionBubbleManager]; | 471 PermissionBubbleManager* manager = [self permissionBubbleManager]; |
472 if (manager && manager->IsBubbleVisible()) { | 472 if (manager && manager->IsBubbleVisible()) { |
473 NSWindow* bubbleWindow = manager->GetBubbleWindow(); | 473 NSWindow* bubbleWindow = manager->GetBubbleWindow(); |
474 DCHECK(bubbleWindow); | 474 DCHECK(bubbleWindow); |
475 // A visible permission bubble will force the dropdown to remain | 475 // A visible permission bubble will force the dropdown to remain |
476 // visible. | 476 // visible. |
477 [self lockBarVisibilityForOwner:bubbleWindow withAnimation:NO delay:NO]; | 477 [self lockBarVisibilityForOwner:bubbleWindow withAnimation:NO delay:NO]; |
478 showDropdown = YES; | 478 showDropdown = YES; |
479 // Register to be notified when the permission bubble is closed, to | 479 // Register to be notified when the permission bubble is closed, to |
480 // allow fullscreen to hide the dropdown. | 480 // allow fullscreen to hide the dropdown. |
481 NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; | 481 NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; |
482 [center addObserver:self | 482 [center addObserver:self |
483 selector:@selector(permissionBubbleWindowWillClose:) | 483 selector:@selector(permissionBubbleWindowWillClose:) |
484 name:NSWindowWillCloseNotification | 484 name:NSWindowWillCloseNotification |
485 object:bubbleWindow]; | 485 object:bubbleWindow]; |
486 } | 486 } |
487 | 487 |
488 NSView* contentView = [[self window] contentView]; | 488 NSView* contentView = [[self window] contentView]; |
489 [presentationModeController_ | 489 [fullscreenToolbarController_ |
490 enterPresentationModeForContentView:contentView | 490 setupFullscreenToolbarForContentView:contentView |
491 showDropdown:showDropdown]; | 491 showDropdown:showDropdown]; |
492 } | 492 } |
493 | 493 |
494 - (void)adjustUIForExitingFullscreenAndStopOmniboxSliding { | 494 - (void)adjustUIForExitingFullscreenAndStopOmniboxSliding { |
495 [presentationModeController_ exitPresentationMode]; | 495 [fullscreenToolbarController_ exitFullscreenMode]; |
496 presentationModeController_.reset(); | 496 fullscreenToolbarController_.reset(); |
497 | 497 |
498 // Force the bookmark bar z-order to update. | 498 // Force the bookmark bar z-order to update. |
499 [[bookmarkBarController_ view] removeFromSuperview]; | 499 [[bookmarkBarController_ view] removeFromSuperview]; |
500 [self layoutSubviews]; | 500 [self layoutSubviews]; |
501 } | 501 } |
502 | 502 |
503 - (void)adjustUIForSlidingFullscreenStyle:(fullscreen_mac::SlidingStyle)style { | 503 - (void)adjustUIForSlidingFullscreenStyle:(fullscreen_mac::SlidingStyle)style { |
504 if (!presentationModeController_) { | 504 if (!fullscreenToolbarController_) { |
505 presentationModeController_.reset( | 505 fullscreenToolbarController_.reset( |
506 [self newPresentationModeControllerWithStyle:style]); | 506 [self newFullscreenToolbarControllerWithStyle:style]); |
507 [self configurePresentationModeController]; | 507 [self configureFullscreenToolbarController]; |
508 } else { | 508 } else { |
509 presentationModeController_.get().slidingStyle = style; | 509 fullscreenToolbarController_.get().slidingStyle = style; |
510 } | 510 } |
511 | 511 |
512 if (!floatingBarBackingView_.get() && | 512 if (!floatingBarBackingView_.get() && |
513 ([self hasTabStrip] || [self hasToolbar] || [self hasLocationBar])) { | 513 ([self hasTabStrip] || [self hasToolbar] || [self hasLocationBar])) { |
514 floatingBarBackingView_.reset( | 514 floatingBarBackingView_.reset( |
515 [[FloatingBarBackingView alloc] initWithFrame:NSZeroRect]); | 515 [[FloatingBarBackingView alloc] initWithFrame:NSZeroRect]); |
516 [floatingBarBackingView_ | 516 [floatingBarBackingView_ |
517 setAutoresizingMask:(NSViewWidthSizable | NSViewMinYMargin)]; | 517 setAutoresizingMask:(NSViewWidthSizable | NSViewMinYMargin)]; |
518 } | 518 } |
519 | 519 |
520 // Force the bookmark bar z-order to update. | 520 // Force the bookmark bar z-order to update. |
521 [[bookmarkBarController_ view] removeFromSuperview]; | 521 [[bookmarkBarController_ view] removeFromSuperview]; |
522 [self layoutSubviews]; | 522 [self layoutSubviews]; |
523 } | 523 } |
524 | 524 |
525 - (PresentationModeController*)newPresentationModeControllerWithStyle: | 525 - (FullscreenToolbarController*)newFullscreenToolbarControllerWithStyle: |
526 (fullscreen_mac::SlidingStyle)style { | 526 (fullscreen_mac::SlidingStyle)style { |
527 return [[PresentationModeController alloc] initWithBrowserController:self | 527 return [[FullscreenToolbarController alloc] initWithBrowserController:self |
528 style:style]; | 528 style:style]; |
529 } | 529 } |
530 | 530 |
531 - (void)enterImmersiveFullscreen { | 531 - (void)enterImmersiveFullscreen { |
532 RecordFullscreenWindowLocation([self window]); | 532 RecordFullscreenWindowLocation([self window]); |
533 RecordFullscreenStyle(IMMERSIVE_FULLSCREEN); | 533 RecordFullscreenStyle(IMMERSIVE_FULLSCREEN); |
534 | 534 |
535 // Set to NO by |-windowDidEnterFullScreen:|. | 535 // Set to NO by |-windowDidEnterFullScreen:|. |
536 enteringImmersiveFullscreen_ = YES; | 536 enteringImmersiveFullscreen_ = YES; |
537 | 537 |
538 // Fade to black. | 538 // Fade to black. |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 } | 873 } |
874 | 874 |
875 - (void)enableBarVisibilityUpdates { | 875 - (void)enableBarVisibilityUpdates { |
876 // Early escape if there's nothing to do. | 876 // Early escape if there's nothing to do. |
877 if (barVisibilityUpdatesEnabled_) | 877 if (barVisibilityUpdatesEnabled_) |
878 return; | 878 return; |
879 | 879 |
880 barVisibilityUpdatesEnabled_ = YES; | 880 barVisibilityUpdatesEnabled_ = YES; |
881 | 881 |
882 if ([barVisibilityLocks_ count]) | 882 if ([barVisibilityLocks_ count]) |
883 [presentationModeController_ ensureOverlayShownWithAnimation:NO delay:NO]; | 883 [fullscreenToolbarController_ ensureOverlayShownWithAnimation:NO delay:NO]; |
884 else | 884 else |
885 [presentationModeController_ ensureOverlayHiddenWithAnimation:NO delay:NO]; | 885 [fullscreenToolbarController_ ensureOverlayHiddenWithAnimation:NO delay:NO]; |
886 } | 886 } |
887 | 887 |
888 - (void)disableBarVisibilityUpdates { | 888 - (void)disableBarVisibilityUpdates { |
889 // Early escape if there's nothing to do. | 889 // Early escape if there's nothing to do. |
890 if (!barVisibilityUpdatesEnabled_) | 890 if (!barVisibilityUpdatesEnabled_) |
891 return; | 891 return; |
892 | 892 |
893 barVisibilityUpdatesEnabled_ = NO; | 893 barVisibilityUpdatesEnabled_ = NO; |
894 [presentationModeController_ cancelAnimationAndTimers]; | 894 [fullscreenToolbarController_ cancelAnimationAndTimers]; |
895 } | 895 } |
896 | 896 |
897 - (void)hideOverlayIfPossibleWithAnimation:(BOOL)animation delay:(BOOL)delay { | 897 - (void)hideOverlayIfPossibleWithAnimation:(BOOL)animation delay:(BOOL)delay { |
898 if (!barVisibilityUpdatesEnabled_ || [barVisibilityLocks_ count]) | 898 if (!barVisibilityUpdatesEnabled_ || [barVisibilityLocks_ count]) |
899 return; | 899 return; |
900 [presentationModeController_ ensureOverlayHiddenWithAnimation:animation | 900 [fullscreenToolbarController_ ensureOverlayHiddenWithAnimation:animation |
901 delay:delay]; | 901 delay:delay]; |
902 } | 902 } |
903 | 903 |
904 - (CGFloat)toolbarDividerOpacity { | 904 - (CGFloat)toolbarDividerOpacity { |
905 return [bookmarkBarController_ toolbarDividerOpacity]; | 905 return [bookmarkBarController_ toolbarDividerOpacity]; |
906 } | 906 } |
907 | 907 |
908 - (void)updateInfoBarTipVisibility { | 908 - (void)updateInfoBarTipVisibility { |
909 // If there's no toolbar then hide the infobar tip. | 909 // If there's no toolbar then hide the infobar tip. |
910 [infoBarContainerController_ | 910 [infoBarContainerController_ |
911 setShouldSuppressTopInfoBarTip:![self hasToolbar]]; | 911 setShouldSuppressTopInfoBarTip:![self hasToolbar]]; |
912 } | 912 } |
913 | 913 |
914 - (NSInteger)pageInfoBubblePointY { | 914 - (NSInteger)pageInfoBubblePointY { |
915 LocationBarViewMac* locationBarView = [self locationBarBridge]; | 915 LocationBarViewMac* locationBarView = [self locationBarBridge]; |
916 | 916 |
917 // The point, in window coordinates. | 917 // The point, in window coordinates. |
918 NSPoint iconBottom = locationBarView->GetPageInfoBubblePoint(); | 918 NSPoint iconBottom = locationBarView->GetPageInfoBubblePoint(); |
919 | 919 |
920 // The toolbar, in window coordinates. | 920 // The toolbar, in window coordinates. |
921 NSView* toolbar = [toolbarController_ view]; | 921 NSView* toolbar = [toolbarController_ view]; |
922 CGFloat toolbarY = NSMinY([toolbar convertRect:[toolbar bounds] toView:nil]); | 922 CGFloat toolbarY = NSMinY([toolbar convertRect:[toolbar bounds] toView:nil]); |
923 | 923 |
924 return iconBottom.y - toolbarY; | 924 return iconBottom.y - toolbarY; |
925 } | 925 } |
926 | 926 |
927 - (void)enterAppKitFullscreen { | 927 - (void)enterAppKitFullscreen { |
928 if (FramedBrowserWindow* framedBrowserWindow = | 928 [[self window] toggleFullScreen:nil]; |
929 base::mac::ObjCCast<FramedBrowserWindow>([self window])) { | |
930 [framedBrowserWindow toggleSystemFullScreen]; | |
931 } | |
932 } | 929 } |
933 | 930 |
934 - (void)exitAppKitFullscreen { | 931 - (void)exitAppKitFullscreen { |
935 if (FramedBrowserWindow* framedBrowserWindow = | 932 // If we're in the process of entering fullscreen, toggleSystemFullscreen |
936 base::mac::ObjCCast<FramedBrowserWindow>([self window])) { | 933 // will get ignored. Set |shouldExitAfterEnteringFullscreen_| to true so |
| 934 // the browser will exit fullscreen immediately after it enters it. |
| 935 if (enteringAppKitFullscreen_) { |
| 936 shouldExitAfterEnteringFullscreen_ = YES; |
| 937 return; |
| 938 } |
937 | 939 |
938 // If we're in the process of entering fullscreen, toggleSystemFullscreen | 940 [[self window] toggleFullScreen:nil]; |
939 // will get ignored. Set |shouldExitAfterEnteringFullscreen_| to true so | |
940 // the browser will exit fullscreen immediately after it enters it. | |
941 if (enteringAppKitFullscreen_) { | |
942 shouldExitAfterEnteringFullscreen_ = YES; | |
943 return; | |
944 } | |
945 | |
946 [framedBrowserWindow toggleSystemFullScreen]; | |
947 } | |
948 } | 941 } |
949 | 942 |
950 - (NSRect)fullscreenButtonFrame { | 943 - (NSRect)fullscreenButtonFrame { |
951 NSButton* fullscreenButton = | 944 NSButton* fullscreenButton = |
952 [[self window] standardWindowButton:NSWindowFullScreenButton]; | 945 [[self window] standardWindowButton:NSWindowFullScreenButton]; |
953 if (!fullscreenButton) | 946 if (!fullscreenButton) |
954 return NSZeroRect; | 947 return NSZeroRect; |
955 | 948 |
956 NSRect buttonFrame = [fullscreenButton frame]; | 949 NSRect buttonFrame = [fullscreenButton frame]; |
957 | 950 |
(...skipping 10 matching lines...) Expand all Loading... |
968 - (void)updateLayoutParameters:(BrowserWindowLayout*)layout { | 961 - (void)updateLayoutParameters:(BrowserWindowLayout*)layout { |
969 [layout setContentViewSize:[[[self window] contentView] bounds].size]; | 962 [layout setContentViewSize:[[[self window] contentView] bounds].size]; |
970 | 963 |
971 NSSize windowSize = (fullscreenTransition_.get()) | 964 NSSize windowSize = (fullscreenTransition_.get()) |
972 ? [fullscreenTransition_ desiredWindowLayoutSize] | 965 ? [fullscreenTransition_ desiredWindowLayoutSize] |
973 : [[self window] frame].size; | 966 : [[self window] frame].size; |
974 | 967 |
975 [layout setWindowSize:windowSize]; | 968 [layout setWindowSize:windowSize]; |
976 | 969 |
977 [layout setInAnyFullscreen:[self isInAnyFullscreenMode]]; | 970 [layout setInAnyFullscreen:[self isInAnyFullscreenMode]]; |
978 [layout setFullscreenSlidingStyle: | 971 [layout setFullscreenSlidingStyle:fullscreenToolbarController_.get() |
979 presentationModeController_.get().slidingStyle]; | 972 .slidingStyle]; |
980 [layout setFullscreenMenubarOffset: | 973 [layout |
981 [presentationModeController_ menubarOffset]]; | 974 setFullscreenMenubarOffset:[fullscreenToolbarController_ menubarOffset]]; |
982 [layout setFullscreenToolbarFraction: | 975 [layout setFullscreenToolbarFraction:[fullscreenToolbarController_ |
983 [presentationModeController_ toolbarFraction]]; | 976 toolbarFraction]]; |
984 | 977 |
985 [layout setHasTabStrip:[self hasTabStrip]]; | 978 [layout setHasTabStrip:[self hasTabStrip]]; |
986 [layout setFullscreenButtonFrame:[self fullscreenButtonFrame]]; | 979 [layout setFullscreenButtonFrame:[self fullscreenButtonFrame]]; |
987 | 980 |
988 if ([self shouldShowAvatar]) { | 981 if ([self shouldShowAvatar]) { |
989 NSView* avatar = [avatarButtonController_ view]; | 982 NSView* avatar = [avatarButtonController_ view]; |
990 [layout setShouldShowAvatar:YES]; | 983 [layout setShouldShowAvatar:YES]; |
991 [layout setShouldUseNewAvatar:[self shouldUseNewAvatarButton]]; | 984 [layout setShouldUseNewAvatar:[self shouldUseNewAvatarButton]]; |
992 [layout setAvatarSize:[avatar frame].size]; | 985 [layout setAvatarSize:[avatar frame].size]; |
993 [layout setAvatarLineWidth:[[avatar superview] cr_lineWidth]]; | 986 [layout setAvatarLineWidth:[[avatar superview] cr_lineWidth]]; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 [infoBarContainerController_ | 1031 [infoBarContainerController_ |
1039 setInfobarArrowX:[self locationBarBridge]->GetPageInfoBubblePoint().x]; | 1032 setInfobarArrowX:[self locationBarBridge]->GetPageInfoBubblePoint().x]; |
1040 | 1033 |
1041 if (!NSIsEmptyRect(output.downloadShelfFrame)) | 1034 if (!NSIsEmptyRect(output.downloadShelfFrame)) |
1042 [[downloadShelfController_ view] setFrame:output.downloadShelfFrame]; | 1035 [[downloadShelfController_ view] setFrame:output.downloadShelfFrame]; |
1043 | 1036 |
1044 [self layoutTabContentArea:output.contentAreaFrame]; | 1037 [self layoutTabContentArea:output.contentAreaFrame]; |
1045 | 1038 |
1046 if (!NSIsEmptyRect(output.fullscreenBackingBarFrame)) { | 1039 if (!NSIsEmptyRect(output.fullscreenBackingBarFrame)) { |
1047 [floatingBarBackingView_ setFrame:output.fullscreenBackingBarFrame]; | 1040 [floatingBarBackingView_ setFrame:output.fullscreenBackingBarFrame]; |
1048 [presentationModeController_ | 1041 [fullscreenToolbarController_ |
1049 overlayFrameChanged:output.fullscreenBackingBarFrame]; | 1042 overlayFrameChanged:output.fullscreenBackingBarFrame]; |
1050 } | 1043 } |
1051 | 1044 |
1052 [findBarCocoaController_ | 1045 [findBarCocoaController_ |
1053 positionFindBarViewAtMaxY:output.findBarMaxY | 1046 positionFindBarViewAtMaxY:output.findBarMaxY |
1054 maxWidth:NSWidth(output.contentAreaFrame)]; | 1047 maxWidth:NSWidth(output.contentAreaFrame)]; |
1055 | 1048 |
1056 exclusiveAccessController_->Layout(output.fullscreenExitButtonMaxY); | 1049 exclusiveAccessController_->Layout(output.fullscreenExitButtonMaxY); |
1057 | 1050 |
1058 if (fullscreenLowPowerCoordinator_) { | 1051 if (fullscreenLowPowerCoordinator_) { |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1303 if (fullscreenLowPowerCoordinator_) | 1296 if (fullscreenLowPowerCoordinator_) |
1304 fullscreenLowPowerCoordinator_->SetHasActiveSheet(false); | 1297 fullscreenLowPowerCoordinator_->SetHasActiveSheet(false); |
1305 } | 1298 } |
1306 | 1299 |
1307 - (void)childWindowsDidChange { | 1300 - (void)childWindowsDidChange { |
1308 if (fullscreenLowPowerCoordinator_) | 1301 if (fullscreenLowPowerCoordinator_) |
1309 fullscreenLowPowerCoordinator_->ChildWindowsChanged(); | 1302 fullscreenLowPowerCoordinator_->ChildWindowsChanged(); |
1310 } | 1303 } |
1311 | 1304 |
1312 @end // @implementation BrowserWindowController(Private) | 1305 @end // @implementation BrowserWindowController(Private) |
OLD | NEW |