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

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

Issue 2588713002: Upstream Chrome on iOS source code [4/11]. (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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/fancy_ui/bidi_container_view.h
diff --git a/ios/chrome/browser/ui/fancy_ui/bidi_container_view.h b/ios/chrome/browser/ui/fancy_ui/bidi_container_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..da23f9b55590479176469086fe971d7f41ce0b6e
--- /dev/null
+++ b/ios/chrome/browser/ui/fancy_ui/bidi_container_view.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+#ifndef IOS_CHROME_BROWSER_UI_FANCY_UI_BIDI_CONTAINER_VIEW_H_
+#define IOS_CHROME_BROWSER_UI_FANCY_UI_BIDI_CONTAINER_VIEW_H_
+
+#import <UIKit/UIKit.h>
+
+#include "base/mac/scoped_nsobject.h"
+
+namespace ios {
+namespace rtl {
+enum AdjustSubviewsForRTLType {
+ ADJUST_FRAME_AND_AUTOROTATION_MASK_FOR_ALL_SUBVIEWS,
+ ADJUST_FRAME_FOR_UPDATED_SUBVIEWS
+};
+} // namespace rtl
+} // namespace ios
+
+// A UIView that lays outs its subviews based on the direction of the current
+// language. If the current language is RTL then during the first call to
+// |layoutSubviews|, this view will flip horizontally all its subviews around
+// its center axis and adjust the autoresizing masks.
+@interface BidiContainerView : UIView {
+ @private
+ ios::rtl::AdjustSubviewsForRTLType adjustSubviewsType_;
+ base::scoped_nsobject<NSMutableSet> subviewsToBeAdjustedForRTL_;
+}
+
+// Adds |subview| to the set of subviews that need to be adjusted to RTL. If the
+// current language is RTL, then the next call |layoutSubviews| will flip
+// |subview| horizontally around its center axis.
+- (void)setSubviewNeedsAdjustmentForRTL:(UIView*)subview;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_FANCY_UI_BIDI_CONTAINER_VIEW_H_
« no previous file with comments | « ios/chrome/browser/ui/fade_truncated_label.mm ('k') | ios/chrome/browser/ui/fancy_ui/bidi_container_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698