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..d218d1ac34de12c8e2bad382d9535839ca70372f |
| --- /dev/null |
| +++ b/ui/base/cocoa/rtl_feature.mm |
| @@ -0,0 +1,25 @@ |
| +// 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> |
| + |
| +#include "base/i18n/rtl.h" |
| +#include "base/mac/mac_util.h" |
| + |
| +namespace ui { |
|
Robert Sesek
2016/12/07 19:21:01
nit: blank line after
lgrey
2016/12/07 19:34:21
Done.
|
| +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 |