Index: ui/keyboard/keyboard_util.cc |
diff --git a/ui/keyboard/keyboard_util.cc b/ui/keyboard/keyboard_util.cc |
index 7048be2e5564f354b113df0185dbf009935c03ba..fadbf1ca96661f70277490355cfe6e537c7e4d86 100644 |
--- a/ui/keyboard/keyboard_util.cc |
+++ b/ui/keyboard/keyboard_util.cc |
@@ -116,6 +116,24 @@ bool IsKeyboardUsabilityExperimentEnabled() { |
switches::kKeyboardUsabilityExperiment); |
} |
+bool IsKeyboardOverscrollEnabled() { |
+ if (!IsKeyboardEnabled()) |
+ return false; |
+ // Users of the accessibility on-screen keyboard are likely to be using mouse |
+ // input, which may interfere with overscrolling. |
+ if (g_accessibility_keyboard_enabled) |
+ return false; |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kDisableVirtualKeyboardOverscroll)) { |
+ return false; |
+ } |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableVirtualKeyboardOverscroll)) { |
+ return true; |
+ } |
+ return false; |
+} |
+ |
bool IsInputViewEnabled() { |
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableInputView)) |
return true; |