Chromium Code Reviews| Index: ui/base/cocoa/rtl_feature.mm |
| diff --git a/ui/base/cocoa/rtl_feature.mm b/ui/base/cocoa/rtl_feature.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e884645c8b91ddb7c98279c4a6ce085326d28df6 |
| --- /dev/null |
| +++ b/ui/base/cocoa/rtl_feature.mm |
| @@ -0,0 +1,26 @@ |
| +// 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. |
| + |
| +#import "ui/base/cocoa/rtl_feature.h" |
| + |
| +#import <Cocoa/Cocoa.h> |
|
tapted
2016/12/07 23:20:27
is this needed?
|
| + |
| +#include "base/i18n/rtl.h" |
| +#include "base/mac/mac_util.h" |
| + |
| +namespace ui { |
| + |
| +const base::Feature kExperimentalMacRTL{"ExperimentalMacRTL", |
| + base::FEATURE_DISABLED_BY_DEFAULT}; |
| + |
| +bool ShouldDoExperimentalRTLLayout() { |
| + return base::i18n::IsRTL() && |
| + base::FeatureList::IsEnabled(kExperimentalMacRTL); |
| +} |
| + |
| +bool ShouldFlipWindowControlsInRTL() { |
| + return ShouldDoExperimentalRTLLayout() && base::mac::IsAtLeastOS10_12(); |
| +} |
| + |
| +} // namespace ui |