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..bf59f2fc5114c9a969efb33e80c80fb24a282957 |
| --- /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) |
|
bokan
2017/04/11 19:11:42
Shouldn't ChromeOS also be enabled by default?
chaopeng
2017/04/11 19:16:48
We can enable on finch configuration for now. Then
bokan
2017/04/11 19:26:31
I think the idea is that we'd use finch to disable
chaopeng
2017/04/11 20:27:33
Done.
|
| +const base::Feature kOverlayScrollbar{"OverlayScrollbar", |
| + 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 |