Index: ui/keyboard/keyboard_util.cc |
diff --git a/ui/keyboard/keyboard_util.cc b/ui/keyboard/keyboard_util.cc |
index 23404bc4f155d85673ef558ca67bc66e42c278fb..e531f991e7a676f5df9ca786d2eff5dd7fb558c9 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 = 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 SetForceDisableVirtualKeyboard(bool disable) { |
+ g_force_disable_keyboard = disable; |
+} |
+ |
+bool GetForceDisableVirtualKeyboard() { |
+ return g_force_disable_keyboard; |
+} |
+ |
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) |
+ return false; |
// Accessibility setting prioritized over policy setting. |
if (g_accessibility_keyboard_enabled) |
return true; |