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

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

Issue 2569713002: [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
13 bool UseRTLLayout() { 17 bool UseRTLLayout() {
14 return base::i18n::IsRTL(); 18 return base::i18n::IsRTL();
15 } 19 }
16 20
17 base::i18n::TextDirection LayoutDirection() { 21 base::i18n::TextDirection LayoutDirection() {
18 return UseRTLLayout() ? base::i18n::RIGHT_TO_LEFT : base::i18n::LEFT_TO_RIGHT; 22 return UseRTLLayout() ? base::i18n::RIGHT_TO_LEFT : base::i18n::LEFT_TO_RIGHT;
19 } 23 }
20 24
21 #pragma mark - LayoutRects. 25 #pragma mark - LayoutRects.
22 26
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 274 }
271 275
272 #pragma mark - autolayout utilities 276 #pragma mark - autolayout utilities
273 277
274 NSLayoutFormatOptions LayoutOptionForRTLSupport() { 278 NSLayoutFormatOptions LayoutOptionForRTLSupport() {
275 if (UseRTLLayout()) { 279 if (UseRTLLayout()) {
276 return NSLayoutFormatDirectionLeadingToTrailing; 280 return NSLayoutFormatDirectionLeadingToTrailing;
277 } 281 }
278 return NSLayoutFormatDirectionLeftToRight; 282 return NSLayoutFormatDirectionLeftToRight;
279 } 283 }
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