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

Side by Side Diff: ios/chrome/browser/ui/rtl_geometry.mm

Issue 2567203002: Revert of [ObjC ARC] Converts ios/chrome/browser/ui:ui to ARC. (Closed)
Patch Set: Created 4 years 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
OLDNEW
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 #include "ios/chrome/browser/ui/rtl_geometry.h" 5 #include "ios/chrome/browser/ui/rtl_geometry.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "ios/chrome/browser/ui/ui_util.h" 11 #include "ios/chrome/browser/ui/ui_util.h"
12 12
13 #if !defined(__has_feature) || !__has_feature(objc_arc)
14 #error "This file requires ARC support."
15 #endif
16
17 bool UseRTLLayout() { 13 bool UseRTLLayout() {
18 return base::i18n::IsRTL(); 14 return base::i18n::IsRTL();
19 } 15 }
20 16
21 base::i18n::TextDirection LayoutDirection() { 17 base::i18n::TextDirection LayoutDirection() {
22 return UseRTLLayout() ? base::i18n::RIGHT_TO_LEFT : base::i18n::LEFT_TO_RIGHT; 18 return UseRTLLayout() ? base::i18n::RIGHT_TO_LEFT : base::i18n::LEFT_TO_RIGHT;
23 } 19 }
24 20
25 #pragma mark - LayoutRects. 21 #pragma mark - LayoutRects.
26 22
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 270 }
275 271
276 #pragma mark - autolayout utilities 272 #pragma mark - autolayout utilities
277 273
278 NSLayoutFormatOptions LayoutOptionForRTLSupport() { 274 NSLayoutFormatOptions LayoutOptionForRTLSupport() {
279 if (UseRTLLayout()) { 275 if (UseRTLLayout()) {
280 return NSLayoutFormatDirectionLeadingToTrailing; 276 return NSLayoutFormatDirectionLeadingToTrailing;
281 } 277 }
282 return NSLayoutFormatDirectionLeftToRight; 278 return NSLayoutFormatDirectionLeftToRight;
283 } 279 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/reversed_animation.mm ('k') | ios/chrome/browser/ui/show_mail_composer_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698