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

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

Issue 2873763003: Rename and move ExperimentalMacRTL flag (Closed)
Patch Set: Created 3 years, 7 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/l10n_util.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 #ifndef CHROME_BROWSER_UI_COCOA_L10N_UTIL_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_L10N_UTIL_H_
6 #define CHROME_BROWSER_UI_COCOA_L10N_UTIL_H_ 6 #define CHROME_BROWSER_UI_COCOA_L10N_UTIL_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 19 matching lines...) Expand all
30 30
31 // Like |base::ReplaceStringPlaceholders(const base::string16&, 31 // Like |base::ReplaceStringPlaceholders(const base::string16&,
32 // const base::string16&, size_t*)|, but for a NSString formatString. 32 // const base::string16&, size_t*)|, but for a NSString formatString.
33 NSString* ReplaceNSStringPlaceholders(NSString* formatString, 33 NSString* ReplaceNSStringPlaceholders(NSString* formatString,
34 const base::string16& a, 34 const base::string16& a,
35 size_t* offset); 35 size_t* offset);
36 36
37 // Generates a tooltip string for a given URL and title. 37 // Generates a tooltip string for a given URL and title.
38 NSString* TooltipForURLAndTitle(NSString* url, NSString* title); 38 NSString* TooltipForURLAndTitle(NSString* url, NSString* title);
39 39
40 extern const base::Feature kExperimentalMacRTL;
41 // Returns whether both: 40 // Returns whether both:
42 // 1) Experimental Mac RTL support is enabled via the ExperimentalMacRTL 41 // 1) Mac RTL support is enabled via the MacRTL feature;
43 // feature;
44 // 2) The browser UI is in RTL mode. 42 // 2) The browser UI is in RTL mode.
45 // If ExperimentalMacRTL becomes the default, this function can be replaced with 43 // If MacRTL becomes the default, this function can be replaced with
46 // uses of base::i18n::IsRTL(). 44 // uses of base::i18n::IsRTL().
47 bool ShouldDoExperimentalRTLLayout(); 45 bool ShouldDoExperimentalRTLLayout();
48 46
49 // Returns true if ShouldDoExperimentalRTLLayout() is true and the OS is 47 // Returns true if ShouldDoExperimentalRTLLayout() is true and the OS is
50 // 10.12 or above. macOS 10.12 is the first OS where the native stoplight 48 // 10.12 or above. macOS 10.12 is the first OS where the native stoplight
51 // buttons are reversed in RTL, so manually reversing them in previous 49 // buttons are reversed in RTL, so manually reversing them in previous
52 // OSes would make Chrome stick out. 50 // OSes would make Chrome stick out.
53 bool ShouldFlipWindowControlsInRTL(); 51 bool ShouldFlipWindowControlsInRTL();
54 52
55 // Returns NSImageLeading when available (10.12+), otherwise 53 // Returns NSImageLeading when available (10.12+), otherwise
56 // NSImageLeft for LTR and NSImageRight in RTL. 54 // NSImageLeft for LTR and NSImageRight in RTL.
57 NSCellImagePosition LeadingCellImagePosition(); 55 NSCellImagePosition LeadingCellImagePosition();
58 // Returns NSImageTrailing when available (10.12+), otherwise 56 // Returns NSImageTrailing when available (10.12+), otherwise
59 // NSImageRight for LTR and NSImageLeft in RTL. 57 // NSImageRight for LTR and NSImageLeft in RTL.
60 NSCellImagePosition TrailingCellImagePosition(); 58 NSCellImagePosition TrailingCellImagePosition();
61 59
62 // Returns an autoreleased image containing |image| flipped 60 // Returns an autoreleased image containing |image| flipped
63 // across the x axis. 61 // across the x axis.
64 NSImage* FlippedImage(NSImage* image); 62 NSImage* FlippedImage(NSImage* image);
65 63
66 } // namespace cocoa_l10n_util 64 } // namespace cocoa_l10n_util
67 65
68 #endif // CHROME_BROWSER_UI_COCOA_L10N_UTIL_H_ 66 #endif // CHROME_BROWSER_UI_COCOA_L10N_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/l10n_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698