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

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

Issue 520733004: mac, yosemite: Resize button causes fullscreen effect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase against top of tree. Created 6 years, 3 months 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/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 [sourceWindow setDelegate:nil]; 577 [sourceWindow setDelegate:nil];
578 [destWindow setDelegate:self]; 578 [destWindow setDelegate:self];
579 579
580 // With this call, valgrind complains that a "Conditional jump or move depends 580 // With this call, valgrind complains that a "Conditional jump or move depends
581 // on uninitialised value(s)". The error happens in -[NSThemeFrame 581 // on uninitialised value(s)". The error happens in -[NSThemeFrame
582 // drawOverlayRect:]. I'm pretty convinced this is an Apple bug, but there is 582 // drawOverlayRect:]. I'm pretty convinced this is an Apple bug, but there is
583 // no visual impact. I have been unable to tickle it away with other window 583 // no visual impact. I have been unable to tickle it away with other window
584 // or view manipulation Cocoa calls. Stack added to suppressions_mac.txt. 584 // or view manipulation Cocoa calls. Stack added to suppressions_mac.txt.
585 [contentView setAutoresizesSubviews:YES]; 585 [contentView setAutoresizesSubviews:YES];
586 [destWindow setContentView:contentView]; 586 [destWindow setContentView:contentView];
587 [self moveContentViewToBack:contentView];
587 588
588 // Move the incognito badge if present. 589 // Move the incognito badge if present.
589 if ([self shouldShowAvatar]) { 590 if ([self shouldShowAvatar]) {
590 NSView* avatarButtonView = [avatarButtonController_ view]; 591 NSView* avatarButtonView = [avatarButtonController_ view];
591 592
592 [avatarButtonView removeFromSuperview]; 593 [avatarButtonView removeFromSuperview];
593 [avatarButtonView setHidden:YES]; // Will be shown in layout. 594 [avatarButtonView setHidden:YES]; // Will be shown in layout.
594 [[destWindow cr_windowView] addSubview:avatarButtonView]; 595 [[destWindow cr_windowView] addSubview:avatarButtonView];
595 } 596 }
596 597
597 // Add the tab strip after setting the content view and moving the incognito 598 // Add the tab strip after setting the content view and moving the incognito
598 // badge (if any), so that the tab strip will be on top (in the z-order). 599 // badge (if any), so that the tab strip will be on top (in the z-order).
599 if ([self hasTabStrip]) 600 if ([self hasTabStrip])
600 [[destWindow cr_windowView] addSubview:tabStripView]; 601 [self insertTabStripView:tabStripView intoWindow:[self window]];
601 602
602 [sourceWindow setWindowController:nil]; 603 [sourceWindow setWindowController:nil];
603 [self setWindow:destWindow]; 604 [self setWindow:destWindow];
604 [destWindow setWindowController:self]; 605 [destWindow setWindowController:self];
605 606
606 // Move the status bubble over, if we have one. 607 // Move the status bubble over, if we have one.
607 if (statusBubble_) 608 if (statusBubble_)
608 statusBubble_->SwitchParentWindow(destWindow); 609 statusBubble_->SwitchParentWindow(destWindow);
609 610
610 // Move the title over. 611 // Move the title over.
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 NSMakePoint(0, NSHeight([infoBarContainerController_ view].frame) - 1072 NSMakePoint(0, NSHeight([infoBarContainerController_ view].frame) -
1072 overlappingTipHeight); 1073 overlappingTipHeight);
1073 infoBarTop = [[infoBarContainerController_ view] convertPoint:infoBarTop 1074 infoBarTop = [[infoBarContainerController_ view] convertPoint:infoBarTop
1074 toView:nil]; 1075 toView:nil];
1075 1076
1076 topArrowHeight = iconBottom.y - infoBarTop.y; 1077 topArrowHeight = iconBottom.y - infoBarTop.y;
1077 return topArrowHeight; 1078 return topArrowHeight;
1078 } 1079 }
1079 1080
1080 @end // @implementation BrowserWindowController(Private) 1081 @end // @implementation BrowserWindowController(Private)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698