| OLD | NEW |
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // If ExperimentalMacRTL becomes the default, this function can be replaced with | 45 // If ExperimentalMacRTL becomes the default, this function can be replaced with |
| 46 // uses of base::i18n::IsRTL(). | 46 // uses of base::i18n::IsRTL(). |
| 47 bool ShouldDoExperimentalRTLLayout(); | 47 bool ShouldDoExperimentalRTLLayout(); |
| 48 | 48 |
| 49 // Returns true if ShouldDoExperimentalRTLLayout() is true and the OS is | 49 // 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 | 50 // 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 | 51 // buttons are reversed in RTL, so manually reversing them in previous |
| 52 // OSes would make Chrome stick out. | 52 // OSes would make Chrome stick out. |
| 53 bool ShouldFlipWindowControlsInRTL(); | 53 bool ShouldFlipWindowControlsInRTL(); |
| 54 | 54 |
| 55 // Returns NSImageLeading when available (10.12+), otherwise |
| 56 // NSImageLeft for LTR and NSImageRight in RTL. |
| 57 NSCellImagePosition LeadingCellImagePosition(); |
| 58 // Returns NSImageTrailing when available (10.12+), otherwise |
| 59 // NSImageRight for LTR and NSImageLeft in RTL. |
| 60 NSCellImagePosition TrailingCellImagePosition(); |
| 61 |
| 55 // Returns an autoreleased image containing |image| flipped | 62 // Returns an autoreleased image containing |image| flipped |
| 56 // across the x axis. | 63 // across the x axis. |
| 57 NSImage* FlippedImage(NSImage* image); | 64 NSImage* FlippedImage(NSImage* image); |
| 58 | 65 |
| 59 } // namespace cocoa_l10n_util | 66 } // namespace cocoa_l10n_util |
| 60 | 67 |
| 61 #endif // CHROME_BROWSER_UI_COCOA_L10N_UTIL_H_ | 68 #endif // CHROME_BROWSER_UI_COCOA_L10N_UTIL_H_ |
| OLD | NEW |