Index: ui/keyboard/keyboard_util.cc |
diff --git a/ui/keyboard/keyboard_util.cc b/ui/keyboard/keyboard_util.cc |
index 23404bc4f155d85673ef558ca67bc66e42c278fb..a0b5e4f88bfc22559f8ff3b8d1ac70e657a398f6 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_web_ui_override_block_keyboard_enabled = 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 SetWebUiOverrideEnabled(bool enabled) { |
+ g_web_ui_override_block_keyboard_enabled = enabled; |
+} |
+ |
+bool GetWebUiOverrideEnabled() { |
+ return g_web_ui_override_block_keyboard_enabled; |
+} |
+ |
void SetAccessibilityKeyboardEnabled(bool enabled) { |
g_accessibility_keyboard_enabled = enabled; |
} |
@@ -111,6 +121,10 @@ std::string GetKeyboardLayout() { |
} |
bool IsKeyboardEnabled() { |
+ // Blocks keyboard from showing up regardless of other settings. |
+ if (g_web_ui_override_block_keyboard_enabled) |
+ return false; |
+ |
jdufault
2016/10/26 17:56:16
Remove newline (follow existing style).
sammiequon
2016/10/27 00:22:40
Done.
|
// Accessibility setting prioritized over policy setting. |
if (g_accessibility_keyboard_enabled) |
return true; |