Chromium Code Reviews| Index: ui/base/cocoa/rtl_util.mm |
| diff --git a/ui/base/cocoa/rtl_util.mm b/ui/base/cocoa/rtl_util.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b7049db33830b1dbe1602b6fb1d384d9e2d190de |
| --- /dev/null |
| +++ b/ui/base/cocoa/rtl_util.mm |
| @@ -0,0 +1,25 @@ |
| +// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
|
Robert Sesek
2016/12/07 16:09:59
nit: no (c) in new files
|
| +// 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_util.h" |
| + |
| +#import <Cocoa/Cocoa.h> |
| + |
| +#include "base/i18n/rtl.h" |
| +#include "base/mac/mac_util.h" |
| + |
| +namespace cocoa_rtl_util { |
|
Robert Sesek
2016/12/07 16:09:59
nit: blank lines on the inside of the namespace
|
| +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 cocoa_rtl_util |