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

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: comments 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
Index: ui/keyboard/keyboard_util.cc
diff --git a/ui/keyboard/keyboard_util.cc b/ui/keyboard/keyboard_util.cc
index 1d9409be7d2726b73f41525a185293e09beb4f28..3bbe6576d326f4df02034235b9377057c6111570 100644
--- a/ui/keyboard/keyboard_util.cc
+++ b/ui/keyboard/keyboard_util.cc
@@ -45,6 +45,10 @@ base::LazyInstance<GURL> g_override_content_url = LAZY_INSTANCE_INITIALIZER;
bool g_touch_keyboard_enabled = false;
+bool g_keyboard_overscroll_override_enabled = false;
+
+bool g_keyboard_overscroll_enabled_override_value = true;
kevers 2014/05/21 13:56:11 Feels a bit messy using 2 booleans here. Can we re
Nikita (slow) 2014/05/21 17:21:04 Done.
+
} // namespace
namespace keyboard {
@@ -110,10 +114,17 @@ 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_enabled)
+ return g_keyboard_overscroll_enabled_override_value;
+
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableVirtualKeyboardOverscroll)) {
return false;
@@ -121,6 +132,14 @@ bool IsKeyboardOverscrollEnabled() {
return true;
}
+void SetKeyboardOverscrollEnabledOverrideValue(bool enabled) {
+ g_keyboard_overscroll_enabled_override_value = enabled;
+}
+
+void SetKeyboardOverscrollOverrideEnabled(bool enabled) {
+ g_keyboard_overscroll_override_enabled = enabled;
+}
+
bool IsInputViewEnabled() {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableInputView))
return true;
« chrome/browser/resources/login/user_pod_row.js ('K') | « ui/keyboard/keyboard_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698