| Index: ash/virtual_keyboard_controller.cc
|
| diff --git a/ash/virtual_keyboard_controller.cc b/ash/virtual_keyboard_controller.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6bd535a2d45b0d629f22c9f087cfadf104dcb892
|
| --- /dev/null
|
| +++ b/ash/virtual_keyboard_controller.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_controller.h"
|
| +
|
| +#include "ash/shell.h"
|
| +#include "ui/keyboard/keyboard_util.h"
|
| +
|
| +namespace ash {
|
| +
|
| +VirtualKeyboardController::VirtualKeyboardController() {
|
| + Shell::GetInstance()->AddShellObserver(this);
|
| +}
|
| +
|
| +VirtualKeyboardController::~VirtualKeyboardController() {
|
| + Shell::GetInstance()->RemoveShellObserver(this);
|
| +}
|
| +
|
| +void VirtualKeyboardController::OnMaximizeModeStarted() {
|
| + keyboard::SetTouchKeyboardEnabled(true);
|
| + Shell::GetInstance()->CreateKeyboard();
|
| +}
|
| +
|
| +void VirtualKeyboardController::OnMaximizeModeEnded() {
|
| + keyboard::SetTouchKeyboardEnabled(false);
|
| + if (!keyboard::IsKeyboardEnabled())
|
| + Shell::GetInstance()->DeactivateKeyboard();
|
| +}
|
| +
|
| +} // namespace ash
|
|
|