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

Unified Diff: ui/native_theme/native_theme_features.cc

Issue 2806263005: Convert the overlay scrollbar flag to use FeatureList (Closed)
Patch Set: remove ScopedFeatureList change 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
« no previous file with comments | « ui/native_theme/native_theme_features.h ('k') | ui/native_theme/native_theme_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3eeb547311502a3da4c1aee1af6d6e1cfe900b5a
--- /dev/null
+++ b/ui/native_theme/native_theme_features.cc
@@ -0,0 +1,31 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
Ilya Sherman 2017/04/19 21:42:30 nit: 2017
+// 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
Ilya Sherman 2017/04/19 21:42:30 nit: s/are/is
+// PlatformStyle::CreateScrollBar. Does nothing on Mac.
+const base::Feature kOverlayScrollbar{"OverlayScrollbar",
+ kOverlayScrollbarFeatureState};
+
+} // namespace features
+
+namespace ui {
+
+bool IsOverlayScrollbarEnabled() {
+ return base::FeatureList::IsEnabled(features::kOverlayScrollbar);
+}
+
+} // namespace ui
« no previous file with comments | « ui/native_theme/native_theme_features.h ('k') | ui/native_theme/native_theme_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698