Chromium Code Reviews| Index: ui/base/cocoa/rtl_feature.h |
| diff --git a/ui/base/cocoa/rtl_feature.h b/ui/base/cocoa/rtl_feature.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..72bb832f46ce7cd09097ff76feef4e1990defbd3 |
| --- /dev/null |
| +++ b/ui/base/cocoa/rtl_feature.h |
| @@ -0,0 +1,29 @@ |
| +// 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 UI_BASE_COCOA_RTL_FEATURE_H_ |
| +#define UI_BASE_COCOA_RTL_FEATURE_H_ |
| + |
| +#include "base/feature_list.h" |
| +#include "ui/base/ui_base_export.h" |
| + |
| +namespace ui { |
| + |
| +UI_BASE_EXPORT extern const base::Feature kExperimentalMacRTL; |
|
Robert Sesek
2016/12/07 19:21:01
nit: blank line after
lgrey
2016/12/07 19:34:21
Done.
|
| +// Returns whether both: |
| +// 1) Experimental Mac RTL support is enabled via the ExperimentalMacRTL |
| +// feature; |
| +// 2) The browser UI is in RTL mode. |
| +// If ExperimentalMacRTL becomes the default, this function can be replaced with |
| +// uses of base::i18n::IsRTL(). |
| +UI_BASE_EXPORT bool ShouldDoExperimentalRTLLayout(); |
| + |
| +// Returns true if ShouldDoExperimentalRTLLayout() is true and the OS is |
| +// 10.12 or above. macOS 10.12 is the first OS where the native stoplight |
| +// buttons are reversed in RTL, so manually reversing them in previous |
| +// OSes would make Chrome stick out. |
| +UI_BASE_EXPORT bool ShouldFlipWindowControlsInRTL(); |
| + |
| +} // namespace ui |
|
Robert Sesek
2016/12/07 19:21:01
nit: blank line after
lgrey
2016/12/07 19:34:21
Done.
|
| +#endif // UI_BASE_COCOA_RTL_FEATURE_H_ |