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..a8c0925c19341e36e51383b86470390cfc811398 |
| --- /dev/null |
| +++ b/ui/native_theme/native_theme_features.cc |
| @@ -0,0 +1,31 @@ |
| +// 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 { |
| + |
| +#if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| +constexpr base::FeatureState kOverlayScrollbarFeatureState = |
| + base::FEATURE_ENABLED_BY_DEFAULT; |
| +#else |
| +constexpr base::FeatureState kOverlayScrollbarFeatureState = |
| + base::FEATURE_DISABLED_BY_DEFAULT; |
| +#endif |
| + |
| +// 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. |
| +constexpr base::Feature kOverlayScrollbar{"OverlayScrollbar", |
|
dcheng
2017/04/14 23:30:17
This is declared as extern const in the header, bu
chaopeng
2017/04/15 00:12:54
It works. I just follow the declaration from this
|
| + kOverlayScrollbarFeatureState}; |
| + |
| +} // namespace features |
| + |
| +namespace ui { |
| + |
| +bool IsOverlayScrollbarEnabled() { |
| + return base::FeatureList::IsEnabled(features::kOverlayScrollbar); |
| +} |
| + |
| +} // namespace ui |