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

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

Issue 2346783002: mac rtl: pin profile switcher to left edge in rtl (Closed)
Patch Set: ExperimentalMacRTLIsEnabled -> ShouldDoExperimentalRTLLayout Created 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_layout.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #include "chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa .h" 53 #include "chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa .h"
54 #import "chrome/browser/ui/cocoa/fast_resize_view.h" 54 #import "chrome/browser/ui/cocoa/fast_resize_view.h"
55 #import "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" 55 #import "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h"
56 #import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h" 56 #import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h"
57 #import "chrome/browser/ui/cocoa/framed_browser_window.h" 57 #import "chrome/browser/ui/cocoa/framed_browser_window.h"
58 #include "chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h" 58 #include "chrome/browser/ui/cocoa/fullscreen_low_power_coordinator.h"
59 #import "chrome/browser/ui/cocoa/fullscreen_window.h" 59 #import "chrome/browser/ui/cocoa/fullscreen_window.h"
60 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" 60 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h"
61 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h" 61 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h"
62 #import "chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h" 62 #import "chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h"
63 #include "chrome/browser/ui/cocoa/l10n_util.h"
63 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h" 64 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h"
64 #import "chrome/browser/ui/cocoa/profiles/avatar_button_controller.h" 65 #import "chrome/browser/ui/cocoa/profiles/avatar_button_controller.h"
65 #import "chrome/browser/ui/cocoa/profiles/avatar_icon_controller.h" 66 #import "chrome/browser/ui/cocoa/profiles/avatar_icon_controller.h"
66 #import "chrome/browser/ui/cocoa/status_bubble_mac.h" 67 #import "chrome/browser/ui/cocoa/status_bubble_mac.h"
67 #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h" 68 #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h"
68 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" 69 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h"
69 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 70 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
70 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" 71 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h"
71 #import "chrome/browser/ui/cocoa/tabs/tab_view.h" 72 #import "chrome/browser/ui/cocoa/tabs/tab_view.h"
72 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" 73 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 // the browser profile's name unless the browser is incognito. 1656 // the browser profile's name unless the browser is incognito.
1656 NSView* view; 1657 NSView* view;
1657 if ([self shouldUseNewAvatarButton]) { 1658 if ([self shouldUseNewAvatarButton]) {
1658 avatarButtonController_.reset( 1659 avatarButtonController_.reset(
1659 [[AvatarButtonController alloc] initWithBrowser:browser_.get()]); 1660 [[AvatarButtonController alloc] initWithBrowser:browser_.get()]);
1660 } else { 1661 } else {
1661 avatarButtonController_.reset( 1662 avatarButtonController_.reset(
1662 [[AvatarIconController alloc] initWithBrowser:browser_.get()]); 1663 [[AvatarIconController alloc] initWithBrowser:browser_.get()]);
1663 } 1664 }
1664 view = [avatarButtonController_ view]; 1665 view = [avatarButtonController_ view];
1665 [view setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin]; 1666 if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout())
1667 [view setAutoresizingMask:NSViewMaxXMargin | NSViewMinYMargin];
1668 else
1669 [view setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin];
1666 [view setHidden:![self shouldShowAvatar]]; 1670 [view setHidden:![self shouldShowAvatar]];
1667 1671
1668 // Install the view. 1672 // Install the view.
1669 [[[self window] contentView] addSubview:view]; 1673 [[[self window] contentView] addSubview:view];
1670 } 1674 }
1671 1675
1672 // Called when we get a three-finger swipe. 1676 // Called when we get a three-finger swipe.
1673 - (void)swipeWithEvent:(NSEvent*)event { 1677 - (void)swipeWithEvent:(NSEvent*)event {
1674 CGFloat deltaX = [event deltaX]; 1678 CGFloat deltaX = [event deltaX];
1675 CGFloat deltaY = [event deltaY]; 1679 CGFloat deltaY = [event deltaY];
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
2046 2050
2047 - (NSRect)savedRegularWindowFrame { 2051 - (NSRect)savedRegularWindowFrame {
2048 return savedRegularWindowFrame_; 2052 return savedRegularWindowFrame_;
2049 } 2053 }
2050 2054
2051 - (BOOL)isFullscreenTransitionInProgress { 2055 - (BOOL)isFullscreenTransitionInProgress {
2052 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; 2056 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_;
2053 } 2057 }
2054 2058
2055 @end // @implementation BrowserWindowController(WindowType) 2059 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_layout.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698