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 #include "base/mac/bind_objc_block.h" | 10 #include "base/mac/bind_objc_block.h" |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 NSView* avatarButtonView = [avatarButtonController_ view]; | 370 NSView* avatarButtonView = [avatarButtonController_ view]; |
371 | 371 |
372 [avatarButtonView removeFromSuperview]; | 372 [avatarButtonView removeFromSuperview]; |
373 [avatarButtonView setHidden:YES]; // Will be shown in layout. | 373 [avatarButtonView setHidden:YES]; // Will be shown in layout. |
374 [[destWindow contentView] addSubview:avatarButtonView]; | 374 [[destWindow contentView] addSubview:avatarButtonView]; |
375 } | 375 } |
376 | 376 |
377 // Add the tab strip after setting the content view and moving the incognito | 377 // Add the tab strip after setting the content view and moving the incognito |
378 // badge (if any), so that the tab strip will be on top (in the z-order). | 378 // badge (if any), so that the tab strip will be on top (in the z-order). |
379 if ([self hasTabStrip]) | 379 if ([self hasTabStrip]) |
380 [self insertTabStripView:tabStripView intoWindow:destWindow]; | 380 [[destWindow contentView] addSubview:tabStripView]; |
381 | 381 |
382 [sourceWindow setWindowController:nil]; | 382 [sourceWindow setWindowController:nil]; |
383 [self setWindow:destWindow]; | 383 [self setWindow:destWindow]; |
384 [destWindow setWindowController:self]; | 384 [destWindow setWindowController:self]; |
385 | 385 |
386 // Move the status bubble over, if we have one. | 386 // Move the status bubble over, if we have one. |
387 if (statusBubble_) | 387 if (statusBubble_) |
388 statusBubble_->SwitchParentWindow(destWindow); | 388 statusBubble_->SwitchParentWindow(destWindow); |
389 | 389 |
390 // Move the title over. | 390 // Move the title over. |
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 } | 1066 } |
1067 | 1067 |
1068 - (BOOL)shouldConstrainFrameRect { | 1068 - (BOOL)shouldConstrainFrameRect { |
1069 if ([enterFullscreenTransition_ shouldWindowBeUnconstrained]) | 1069 if ([enterFullscreenTransition_ shouldWindowBeUnconstrained]) |
1070 return NO; | 1070 return NO; |
1071 | 1071 |
1072 return [super shouldConstrainFrameRect]; | 1072 return [super shouldConstrainFrameRect]; |
1073 } | 1073 } |
1074 | 1074 |
1075 @end // @implementation BrowserWindowController(Private) | 1075 @end // @implementation BrowserWindowController(Private) |
OLD | NEW |