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

Unified Diff: ui/keyboard/keyboard_util.cc

Issue 292233002: Disable VK overscroll for login/out-of-box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, keyboard override value: convert to bool Created 6 years, 7 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 e28f6d00fb95851203f9803a4dc777b5d3132a81..9c89e6442b3a4ca5119511cfff249e1b63fdb3f1 100644
--- a/ui/keyboard/keyboard_util.cc
+++ b/ui/keyboard/keyboard_util.cc
@@ -44,6 +44,9 @@ base::LazyInstance<GURL> g_override_content_url = LAZY_INSTANCE_INITIALIZER;
bool g_touch_keyboard_enabled = false;
+keyboard::KeyboardOverscrolOverride g_keyboard_overscroll_override =
+ keyboard::KEYBOARD_OVERSCROLL_OVERRIDE_NONE;
+
} // namespace
namespace keyboard {
@@ -109,10 +112,19 @@ bool IsKeyboardUsabilityExperimentEnabled() {
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 overscroll enabled override is set, use it instead. Currently
+ // login / out-of-box disable keyboard overscroll. http://crbug.com/363635
+ if (g_keyboard_overscroll_override != KEYBOARD_OVERSCROLL_OVERRIDE_NONE) {
+ return g_keyboard_overscroll_override ==
+ KEYBOARD_OVERSCROLL_OVERRIDE_ENABLED;
+ }
+
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableVirtualKeyboardOverscroll)) {
return false;
@@ -120,6 +132,10 @@ bool IsKeyboardOverscrollEnabled() {
return true;
}
+void SetKeyboardOverscrollOverride(KeyboardOverscrolOverride override) {
+ g_keyboard_overscroll_override = override;
+}
+
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