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

Unified Diff: ui/keyboard/keyboard_util.cc

Issue 195793004: Implement overscroll support for the virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge ToT Created 6 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/keyboard/keyboard_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_util.cc
diff --git a/ui/keyboard/keyboard_util.cc b/ui/keyboard/keyboard_util.cc
index 1e06795bdcea3381c1382253d5a4898d3c19233c..3425740a117a2109e5422d895e6923cde0015058 100644
--- a/ui/keyboard/keyboard_util.cc
+++ b/ui/keyboard/keyboard_util.cc
@@ -107,6 +107,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;
« no previous file with comments | « ui/keyboard/keyboard_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698