Commit 04a914d3 authored by tony@chromium.org's avatar tony@chromium.org

Chromium side for using overlay scrollbars on Aura or Linux.

Add the command line flag --enable-overlay-scrollbars to enable
overlay scrollbars in Aura and Linux.

BUG=None

Review URL: https://chromiumcodereview.appspot.com/22422010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217100 0039d316-1c4b-4281-b951-d872f2087c98
parent 6b3328b6
...@@ -932,6 +932,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( ...@@ -932,6 +932,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kEnableGpuClientTracing, switches::kEnableGpuClientTracing,
switches::kEnableGpuBenchmarking, switches::kEnableGpuBenchmarking,
switches::kEnableMemoryBenchmarking, switches::kEnableMemoryBenchmarking,
switches::kEnableOverlayScrollbars,
switches::kEnableSkiaBenchmarking, switches::kEnableSkiaBenchmarking,
switches::kEnableLogging, switches::kEnableLogging,
switches::kEnableSpeechSynthesis, switches::kEnableSpeechSynthesis,
......
...@@ -135,6 +135,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( ...@@ -135,6 +135,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
if (command_line.HasSwitch(switches::kEnableHTMLImports)) if (command_line.HasSwitch(switches::kEnableHTMLImports))
WebRuntimeFeatures::enableHTMLImports(true); WebRuntimeFeatures::enableHTMLImports(true);
if (command_line.HasSwitch(switches::kEnableOverlayScrollbars))
WebRuntimeFeatures::enableOverlayScrollbars(true);
} }
} // namespace content } // namespace content
...@@ -424,6 +424,9 @@ const char kEnableNewMediaInternals[] = "enable-new-media-internals"; ...@@ -424,6 +424,9 @@ const char kEnableNewMediaInternals[] = "enable-new-media-internals";
// Enables use of cache if offline, even if it's stale // Enables use of cache if offline, even if it's stale
const char kEnableOfflineCacheAccess[] = "enable-offline-cache-access"; const char kEnableOfflineCacheAccess[] = "enable-offline-cache-access";
// Enables overlay scrollbars on Aura or Linux. Does nothing on Mac.
const char kEnableOverlayScrollbars[] = "enable-overlay-scrollbars";
// Forward overscroll event data from the renderer to the browser. // Forward overscroll event data from the renderer to the browser.
const char kEnableOverscrollNotifications[] = "enable-overscroll-notifications"; const char kEnableOverscrollNotifications[] = "enable-overscroll-notifications";
......
...@@ -130,6 +130,7 @@ extern const char kEnableMemoryBenchmarking[]; ...@@ -130,6 +130,7 @@ extern const char kEnableMemoryBenchmarking[];
extern const char kEnableMonitorProfile[]; extern const char kEnableMonitorProfile[];
extern const char kEnableNewMediaInternals[]; extern const char kEnableNewMediaInternals[];
CONTENT_EXPORT extern const char kEnableOfflineCacheAccess[]; CONTENT_EXPORT extern const char kEnableOfflineCacheAccess[];
extern const char kEnableOverlayScrollbars[];
CONTENT_EXPORT extern const char kEnableOverscrollNotifications[]; CONTENT_EXPORT extern const char kEnableOverscrollNotifications[];
extern const char kEnablePinch[]; extern const char kEnablePinch[];
extern const char kEnablePreparsedJsCaching[]; extern const char kEnablePreparsedJsCaching[];
......
...@@ -277,6 +277,13 @@ scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create( ...@@ -277,6 +277,13 @@ scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create(
// Android WebView handles root layer flings itself. // Android WebView handles root layer flings itself.
settings.ignore_root_layer_flings = settings.ignore_root_layer_flings =
widget->UsingSynchronousRendererCompositor(); widget->UsingSynchronousRendererCompositor();
#elif !defined(OS_MACOSX)
if (cmd->HasSwitch(switches::kEnableOverlayScrollbars)) {
settings.use_linear_fade_scrollbar_animator = true;
settings.solid_color_scrollbars = true;
settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128);
settings.solid_color_scrollbar_thickness_dip = 3;
}
#endif #endif
if (!compositor->initialize(settings)) if (!compositor->initialize(settings))
......
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