| 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;
|
|
|