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

Unified Diff: ios/chrome/browser/ui/fancy_ui/bidi_container_view.mm

Issue 2838213002: [ObjC ARC] Converts ios/chrome/browser/ui/fancy_ui:fancy_ui to ARC. (Closed)
Patch Set: Remove scoped object header Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/fancy_ui/bidi_container_view.mm
diff --git a/ios/chrome/browser/ui/fancy_ui/bidi_container_view.mm b/ios/chrome/browser/ui/fancy_ui/bidi_container_view.mm
index 931176c059ef79668565ef03653e81cb471a9794..912306c2ad6916816899c166724ca567c3fb84b4 100644
--- a/ios/chrome/browser/ui/fancy_ui/bidi_container_view.mm
+++ b/ios/chrome/browser/ui/fancy_ui/bidi_container_view.mm
@@ -7,7 +7,23 @@
#include "base/i18n/rtl.h"
#include "base/logging.h"
-@interface BidiContainerView ()
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+namespace ios {
+namespace rtl {
+enum AdjustSubviewsForRTLType {
+ ADJUST_FRAME_AND_AUTOROTATION_MASK_FOR_ALL_SUBVIEWS,
+ ADJUST_FRAME_FOR_UPDATED_SUBVIEWS
+};
+} // namespace rtl
+} // namespace ios
+
+@interface BidiContainerView () {
+ ios::rtl::AdjustSubviewsForRTLType adjustSubviewsType_;
+ NSMutableSet* subviewsToBeAdjustedForRTL_;
sdefresne 2017/04/28 10:21:31 nit: NSMutableSet<UIView*>* subviewsToBeAdjustedFo
+}
// Changes the autoresizing mask by mirroring it horizontally so that the RTL
// layout is bind to oposite sites than LRT one.
+ (UIViewAutoresizing)mirrorAutoresizingMask:
@@ -71,7 +87,7 @@
if (!base::i18n::IsRTL())
return;
if (!subviewsToBeAdjustedForRTL_)
- subviewsToBeAdjustedForRTL_.reset([[NSMutableSet alloc] init]);
+ subviewsToBeAdjustedForRTL_ = [[NSMutableSet alloc] init];
[subviewsToBeAdjustedForRTL_ addObject:subview];
}
« no previous file with comments | « ios/chrome/browser/ui/fancy_ui/bidi_container_view.h ('k') | ios/chrome/browser/ui/fancy_ui/primary_action_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698