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

Unified Diff: ui/keyboard/keyboard_util.cc

Issue 2444443002: cros: Allow pin keyboard to keep focus without popping up the pin keyboard. (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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 23404bc4f155d85673ef558ca67bc66e42c278fb..950a880c334dfa760bafa048b388bd0a618a5b82 100644
--- a/ui/keyboard/keyboard_util.cc
+++ b/ui/keyboard/keyboard_util.cc
@@ -44,6 +44,8 @@ void SendProcessKeyEvent(ui::EventType type,
base::LazyInstance<base::Time> g_keyboard_load_time_start =
LAZY_INSTANCE_INITIALIZER;
+bool g_force_disable_keyboard_for_web_ui = false;
+
bool g_accessibility_keyboard_enabled = false;
bool g_hotrod_keyboard_enabled = false;
@@ -72,6 +74,14 @@ gfx::Rect FullWidthKeyboardBoundsFromRootBounds(const gfx::Rect& root_bounds,
keyboard_height);
}
+void SetForceDisableVirtualKeyboardForWebUi(bool disable) {
+ g_force_disable_keyboard_for_web_ui = disable;
+}
+
+bool GetForceDisableVirtualKeyboardForWebUi() {
+ return g_force_disable_keyboard_for_web_ui;
+}
+
void SetAccessibilityKeyboardEnabled(bool enabled) {
g_accessibility_keyboard_enabled = enabled;
}
@@ -111,6 +121,9 @@ std::string GetKeyboardLayout() {
}
bool IsKeyboardEnabled() {
+ // Blocks keyboard from showing up regardless of other settings.
+ if (g_force_disable_keyboard_for_web_ui)
+ return false;
// Accessibility setting prioritized over policy setting.
if (g_accessibility_keyboard_enabled)
return true;

Powered by Google App Engine
This is Rietveld 408576698