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

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: Fixed patch set 9 errors. 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..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;

Powered by Google App Engine
This is Rietveld 408576698