Chromium Code Reviews| Index: ui/native_theme/native_theme_features.cc |
| diff --git a/ui/native_theme/native_theme_features.cc b/ui/native_theme/native_theme_features.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5eed429015fb144b8d9e38a2fe9a00c7c14be1a8 |
| --- /dev/null |
| +++ b/ui/native_theme/native_theme_features.cc |
| @@ -0,0 +1,27 @@ |
| +// Copyright 2014 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. |
| + |
| +#include "ui/native_theme/native_theme_features.h" |
| + |
| +namespace features { |
| + |
| +// Enables or disables overlay scrollbars in Blink (i.e. web content) on Aura |
| +// or Linux. The status of native UI overlay scrollbars are determined in |
| +// PlatformStyle::CreateScrollBar. Does nothing on Mac. |
| +#if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| +const base::Feature kOverlayScrollbar{"OverlayScrollbar", |
|
dtapuska
2017/04/12 17:21:02
I think it is probably more consistent to define O
chaopeng
2017/04/12 20:23:15
Done.
|
| + base::FEATURE_ENABLED_BY_DEFAULT}; |
| +#else |
| +const base::Feature kOverlayScrollbar{"OverlayScrollbar", |
| + base::FEATURE_DISABLED_BY_DEFAULT}; |
| +#endif |
| +} // namespace features |
| + |
| +namespace ui { |
| + |
| +bool IsOverlayScrollbarEnabled() { |
| + return base::FeatureList::IsEnabled(features::kOverlayScrollbar); |
| +} |
| + |
| +} // namespace ui |