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

Unified Diff: ash/virtual_keyboard_observer.cc

Issue 592753004: Enable virtual keyboard in overview mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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: ash/virtual_keyboard_observer.cc
diff --git a/ash/virtual_keyboard_observer.cc b/ash/virtual_keyboard_observer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bb551c51d96e9257717a46f83f41362820c8b3ed
--- /dev/null
+++ b/ash/virtual_keyboard_observer.cc
@@ -0,0 +1,31 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/virtual_keyboard_observer.h"
+
+#include "ash/shell.h"
+#include "ui/keyboard/keyboard_util.h"
+
+namespace ash {
+
+VirtualKeyboardObserver::VirtualKeyboardObserver() {
+ Shell::GetInstance()->AddShellObserver(this);
+}
+
+VirtualKeyboardObserver::~VirtualKeyboardObserver() {
+ Shell::GetInstance()->RemoveShellObserver(this);
+}
+
+void VirtualKeyboardObserver::OnMaximizeModeStarted() {
+ keyboard::SetTouchKeyboardEnabled(true);
+ Shell::GetInstance()->CreateKeyboard();
+}
+
+void VirtualKeyboardObserver::OnMaximizeModeEnded() {
+ keyboard::SetTouchKeyboardEnabled(false);
+ if (!keyboard::IsKeyboardEnabled())
+ Shell::GetInstance()->DeactivateKeyboard();
+}
+
+} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698