Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: ui/native_theme/native_theme_features.cc

Issue 2806263005: Convert the overlay scrollbar flag to use FeatureList (Closed)
Patch Set: update histograms.xml Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698