| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 RTL_GEOMETRY_H_ | 5 #ifndef RTL_GEOMETRY_H_ |
| 6 #define RTL_GEOMETRY_H_ | 6 #define RTL_GEOMETRY_H_ |
| 7 | 7 |
| 8 #include <CoreGraphics/CoreGraphics.h> | 8 #include <CoreGraphics/CoreGraphics.h> |
| 9 #import <UIKit/UIKit.h> | 9 #import <UIKit/UIKit.h> |
| 10 | 10 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // Autolayout utilities | 160 // Autolayout utilities |
| 161 | 161 |
| 162 // Returns the correct NSLayoutFormatOption for the current OS and build. This | 162 // Returns the correct NSLayoutFormatOption for the current OS and build. This |
| 163 // will return NSLayoutFormatDirectionLeadingToTrailing when a full RTL flip | 163 // will return NSLayoutFormatDirectionLeadingToTrailing when a full RTL flip |
| 164 // is correct, and NSLayoutFormatDirectionLeftToRight when layout should not | 164 // is correct, and NSLayoutFormatDirectionLeftToRight when layout should not |
| 165 // change with text direction. | 165 // change with text direction. |
| 166 // Generally speaking this option should be applied to any whole-page layouts; | 166 // Generally speaking this option should be applied to any whole-page layouts; |
| 167 // smaller sections of views should be determined case by case. | 167 // smaller sections of views should be determined case by case. |
| 168 NSLayoutFormatOptions LayoutOptionForRTLSupport(); | 168 NSLayoutFormatOptions LayoutOptionForRTLSupport(); |
| 169 | 169 |
| 170 // Deprecated -- use UseRTLLayout() instead. | |
| 171 // Whether the UI is configured for right to left layout. | |
| 172 // The implementation will use the local in order to get the UI layout direction | |
| 173 // for version of iOS under 9. | |
| 174 // TODO(jbbegue): Use base::i18n::IsRTL() instead when it will support RTL | |
| 175 // pseudo language. Remove that method once base::i18n::IsRTL() is fixed. | |
| 176 // crbug/514625. | |
| 177 bool IsRTLUILayout(); | |
| 178 | |
| 179 #endif // RTL_GEOMETRY_H_ | 170 #endif // RTL_GEOMETRY_H_ |
| OLD | NEW |