Chromium Code Reviews| Index: ui/base/test/scoped_mac_rtl.h |
| diff --git a/ui/base/test/scoped_mac_rtl.h b/ui/base/test/scoped_mac_rtl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..664bb114b85b50d3781802e66b80a8354c6983c1 |
| --- /dev/null |
| +++ b/ui/base/test/scoped_mac_rtl.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2016 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 BASE_TEST_SCOPED_MAC_RTL_H_ |
| +#define BASE_TEST_SCOPED_MAC_RTL_H_ |
| + |
| +#import <Cocoa/Cocoa.h> |
|
Robert Sesek
2016/12/07 16:09:59
Move this into the .mm file so that this file can
|
| +#include <string> |
| + |
| +#include "base/test/scoped_feature_list.h" |
| + |
| +namespace cocoa_rtl_util { |
|
Robert Sesek
2016/12/07 16:09:59
namespace ui
|
| + |
| +// Enables all flags required for |
| +// |cocoa_rtl_util::ShouldDoExperimentalRTLLayout| |
| +// to return true. |
| +class ScopedMacRTL final { |
|
Robert Sesek
2016/12/07 16:09:59
ScopedEnableMacRTLLayout ?
|
| + public: |
| + ScopedMacRTL(); |
| + ~ScopedMacRTL(); |
| + |
| + private: |
| + BOOL original_apple_text_direction_; |
| + BOOL original_rtl_writing_direction_; |
| + std::string original_locale_; |
| + base::test::ScopedFeatureList scoped_feature_list_; |
| + DISALLOW_COPY_AND_ASSIGN(ScopedMacRTL); |
| +}; |
| + |
| +} // namespace cocoa_rtl_util |
| + |
| +#endif // BASE_TEST_SCOPED_MAC_RTL_H_ |