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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index 3d5be0ece4c0eda7cfaae9055ad0bafd8e346252..5d008da722bc20cfaadfd16f1f942e5c2d2dfcdb 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -11,7 +11,6 @@
#include <string>
#include "base/command_line.h"
-#include "base/i18n/rtl.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/mac/sdk_forward_declarations.h"
@@ -139,7 +138,7 @@ void SetCurrentContextShortestDuration() {
};
CGFloat FlipXInView(NSView* view, CGFloat width, CGFloat x) {
- if (cocoa_l10n_util::ExperimentalMacRTLIsEnabled() && base::i18n::IsRTL())
+ if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout())
return [view frame].size.width - x - width;
return x;
}
@@ -1008,7 +1007,7 @@ - (void)layoutTabsWithAnimation:(BOOL)animate
BOOL visible = [[tabStripView_ window] isVisible];
CGFloat offset =
- cocoa_l10n_util::ExperimentalMacRTLIsEnabled() && base::i18n::IsRTL()
+ cocoa_l10n_util::ShouldDoExperimentalRTLLayout()
? [self rightIndentForControls]
: [self leftIndentForControls];
bool hasPlaceholderGap = false;
@@ -1162,7 +1161,7 @@ - (void)layoutTabsWithAnimation:(BOOL)animate
// so we don't have to check it against the available space. We do need
// to make sure we put it after any placeholder.
CGFloat maxTabX = MAX(offset, NSMaxX(placeholderFrame_) - kTabOverlap);
- if (cocoa_l10n_util::ExperimentalMacRTLIsEnabled() && base::i18n::IsRTL()) {
+ if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout()) {
maxTabX = FlipXInView(tabStripView_, [newTabButton_ frame].size.width,
maxTabX) -
(2 * kNewTabButtonOffset);
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698