Chromium Code Reviews| Index: ui/native_theme/native_theme_switches.cc |
| diff --git a/ui/native_theme/native_theme_switches.cc b/ui/native_theme/native_theme_switches.cc |
| index 873af518985c1dc6226256118424e2a6493dd086..7c4ca2c46aa34754d3eed219c57effe115fd75e6 100644 |
| --- a/ui/native_theme/native_theme_switches.cc |
| +++ b/ui/native_theme/native_theme_switches.cc |
| @@ -13,6 +13,9 @@ const char kEnableOverlayScrollbar[] = "enable-overlay-scrollbar"; |
| // Disables overlay scrollbars on Aura or Linux. Does nothing on Mac. |
| const char kDisableOverlayScrollbar[] = "disable-overlay-scrollbar"; |
| +// Hides scrollbars on Aura, Linux, Android, ChromeOS. Does nothing on Mac. |
| +const char kHideScrollbars[] = "hide-scrollbars"; |
| + |
| } // namespace switches |
| namespace ui { |
| @@ -21,6 +24,10 @@ bool IsOverlayScrollbarEnabled() { |
| const base::CommandLine& command_line = |
| *base::CommandLine::ForCurrentProcess(); |
| + // Hidden scrollbars are realized through never-showing overlay scrollbars. |
| + if (ShouldHideScrollbars()) |
| + return true; |
| + |
| if (command_line.HasSwitch(switches::kDisableOverlayScrollbar)) |
| return false; |
| else if (command_line.HasSwitch(switches::kEnableOverlayScrollbar)) |
| @@ -29,4 +36,14 @@ bool IsOverlayScrollbarEnabled() { |
| return false; |
| } |
| +bool ShouldHideScrollbars() { |
| + const base::CommandLine& command_line = |
| + *base::CommandLine::ForCurrentProcess(); |
| + |
| + if (command_line.HasSwitch(switches::kHideScrollbars)) |
|
sky
2016/08/03 23:44:03
No need for the conditional, return command_line.H
Eric Seckler
2016/08/04 08:07:26
Done.
|
| + return true; |
| + |
| + return false; |
| +} |
| + |
| } // namespace ui |