Commit 59b5c0c7 authored by Darin Fisher's avatar Darin Fisher Committed by Commit Bot

[Lacros] Enable overlay scrollbars

Bug: 1141261
Change-Id: I9f877ac89f9435193f04c87a6a3f3d51593f202d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2495516Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Darin Fisher <darin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820496}
parent d81a84fd
...@@ -59,6 +59,7 @@ component("native_theme") { ...@@ -59,6 +59,7 @@ component("native_theme") {
deps = [ deps = [
"//base", "//base",
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//build:chromeos_buildflags",
"//cc/paint", "//cc/paint",
"//ui/base", "//ui/base",
"//ui/color", "//ui/color",
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/notreached.h" #include "base/notreached.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "cc/paint/paint_canvas.h" #include "cc/paint/paint_canvas.h"
#include "cc/paint/paint_flags.h" #include "cc/paint/paint_flags.h"
#include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/core/SkPath.h"
...@@ -75,7 +76,7 @@ NativeThemeAura::NativeThemeAura(bool use_overlay_scrollbars, ...@@ -75,7 +76,7 @@ NativeThemeAura::NativeThemeAura(bool use_overlay_scrollbars,
: NativeThemeBase(should_only_use_dark_colors), : NativeThemeBase(should_only_use_dark_colors),
use_overlay_scrollbars_(use_overlay_scrollbars) { use_overlay_scrollbars_(use_overlay_scrollbars) {
// We don't draw scrollbar buttons. // We don't draw scrollbar buttons.
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS)
set_scrollbar_button_length(0); set_scrollbar_button_length(0);
#endif #endif
......
...@@ -5,10 +5,12 @@ ...@@ -5,10 +5,12 @@
#include "ui/native_theme/native_theme_features.h" #include "ui/native_theme/native_theme_features.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "build/chromeos_buildflags.h"
namespace features { namespace features {
#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_FUCHSIA) #if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_FUCHSIA) || \
BUILDFLAG(IS_LACROS)
constexpr base::FeatureState kOverlayScrollbarFeatureState = constexpr base::FeatureState kOverlayScrollbarFeatureState =
base::FEATURE_ENABLED_BY_DEFAULT; base::FEATURE_ENABLED_BY_DEFAULT;
#else #else
......
...@@ -484,6 +484,7 @@ component("views") { ...@@ -484,6 +484,7 @@ component("views") {
deps = [ deps = [
"//base:i18n", "//base:i18n",
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//build:chromeos_buildflags",
"//cc/paint", "//cc/paint",
"//mojo/public/cpp/bindings", "//mojo/public/cpp/bindings",
"//skia", "//skia",
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "ui/views/style/platform_style.h" #include "ui/views/style/platform_style.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/range/range.h" #include "ui/gfx/range/range.h"
#include "ui/gfx/utf16_indexing.h" #include "ui/gfx/utf16_indexing.h"
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
#include "ui/views/controls/focusable_border.h" #include "ui/views/controls/focusable_border.h"
#include "ui/views/controls/scrollbar/scroll_bar_views.h" #include "ui/views/controls/scrollbar/scroll_bar_views.h"
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS)
#include "ui/views/controls/scrollbar/overlay_scroll_bar.h" #include "ui/views/controls/scrollbar/overlay_scroll_bar.h"
#endif #endif
...@@ -53,7 +54,7 @@ const bool PlatformStyle::kInactiveWidgetControlsAppearDisabled = false; ...@@ -53,7 +54,7 @@ const bool PlatformStyle::kInactiveWidgetControlsAppearDisabled = false;
// static // static
std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) { std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS)
return std::make_unique<OverlayScrollBar>(is_horizontal); return std::make_unique<OverlayScrollBar>(is_horizontal);
#else #else
return std::make_unique<ScrollBarViews>(is_horizontal); return std::make_unique<ScrollBarViews>(is_horizontal);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment