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

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

Issue 2313723004: cocoa: flip window controls and profile switcher for RTL (Closed)
Patch Set: add ExperimentalMacRTL feature 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 | « chrome/browser/ui/cocoa/l10n_util.h ('k') | chrome/browser/ui/cocoa/new_tab_button.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/l10n_util.h" 5 #import "chrome/browser/ui/cocoa/l10n_util.h"
6 6
7 #include "base/feature_list.h"
7 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
8 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
9 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw eaker.h" 10 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw eaker.h"
10 11
11 namespace cocoa_l10n_util { 12 namespace cocoa_l10n_util {
12 13
13 NSInteger CompareFrameY(id view1, id view2, void* context) { 14 NSInteger CompareFrameY(id view1, id view2, void* context) {
14 CGFloat y1 = NSMinY([view1 frame]); 15 CGFloat y1 = NSMinY([view1 frame]);
15 CGFloat y2 = NSMinY([view2 frame]); 16 CGFloat y2 = NSMinY([view2 frame]);
16 if (y1 < y2) 17 if (y1 < y2)
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 76
76 NSString* TooltipForURLAndTitle(NSString* url, NSString* title) { 77 NSString* TooltipForURLAndTitle(NSString* url, NSString* title) {
77 if ([title length] == 0) 78 if ([title length] == 0)
78 return url; 79 return url;
79 else if ([url length] == 0 || [url isEqualToString:title]) 80 else if ([url length] == 0 || [url isEqualToString:title])
80 return title; 81 return title;
81 else 82 else
82 return [NSString stringWithFormat:@"%@\n%@", title, url]; 83 return [NSString stringWithFormat:@"%@\n%@", title, url];
83 } 84 }
84 85
86 const base::Feature kExperimentalMacRTL{"ExperimentalMacRTL",
87 base::FEATURE_DISABLED_BY_DEFAULT};
88
89 bool ExperimentalMacRTLIsEnabled() {
90 return base::FeatureList::IsEnabled(kExperimentalMacRTL);
91 }
92
85 } // namespace cocoa_l10n_util 93 } // namespace cocoa_l10n_util
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/l10n_util.h ('k') | chrome/browser/ui/cocoa/new_tab_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698