| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <numeric> | 8 #include <numeric> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1644 NSView* view; | 1644 NSView* view; |
| 1645 if ([self shouldUseNewAvatarButton]) { | 1645 if ([self shouldUseNewAvatarButton]) { |
| 1646 avatarButtonController_.reset([[AvatarButtonController alloc] | 1646 avatarButtonController_.reset([[AvatarButtonController alloc] |
| 1647 initWithBrowser:browser_.get() | 1647 initWithBrowser:browser_.get() |
| 1648 window:[self window]]); | 1648 window:[self window]]); |
| 1649 } else { | 1649 } else { |
| 1650 avatarButtonController_.reset( | 1650 avatarButtonController_.reset( |
| 1651 [[AvatarIconController alloc] initWithBrowser:browser_.get()]); | 1651 [[AvatarIconController alloc] initWithBrowser:browser_.get()]); |
| 1652 } | 1652 } |
| 1653 view = [avatarButtonController_ view]; | 1653 view = [avatarButtonController_ view]; |
| 1654 if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout()) | |
| 1655 [view setAutoresizingMask:NSViewMaxXMargin | NSViewMinYMargin]; | |
| 1656 else | |
| 1657 [view setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin]; | |
| 1658 [view setHidden:![self shouldShowAvatar]]; | 1654 [view setHidden:![self shouldShowAvatar]]; |
| 1659 | 1655 |
| 1660 // Install the view. | 1656 // Install the view. |
| 1661 [[[self window] contentView] addSubview:view]; | 1657 [[[self window] contentView] addSubview:view]; |
| 1662 } | 1658 } |
| 1663 | 1659 |
| 1664 // Called when we get a three-finger swipe. | 1660 // Called when we get a three-finger swipe. |
| 1665 - (void)swipeWithEvent:(NSEvent*)event { | 1661 - (void)swipeWithEvent:(NSEvent*)event { |
| 1666 CGFloat deltaX = [event deltaX]; | 1662 CGFloat deltaX = [event deltaX]; |
| 1667 CGFloat deltaY = [event deltaY]; | 1663 CGFloat deltaY = [event deltaY]; |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2014 | 2010 |
| 2015 - (NSRect)savedRegularWindowFrame { | 2011 - (NSRect)savedRegularWindowFrame { |
| 2016 return savedRegularWindowFrame_; | 2012 return savedRegularWindowFrame_; |
| 2017 } | 2013 } |
| 2018 | 2014 |
| 2019 - (BOOL)isFullscreenTransitionInProgress { | 2015 - (BOOL)isFullscreenTransitionInProgress { |
| 2020 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; | 2016 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; |
| 2021 } | 2017 } |
| 2022 | 2018 |
| 2023 @end // @implementation BrowserWindowController(WindowType) | 2019 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |