OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/virtual_keyboard_controller.h" | 5 #include "ash/virtual_keyboard_controller.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/keyboard/keyboard_ui.h" | 9 #include "ash/keyboard/keyboard_ui.h" |
10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 Shell::Get()->RemoveShellObserver(this); | 78 Shell::Get()->RemoveShellObserver(this); |
79 ui::InputDeviceManager::GetInstance()->RemoveObserver(this); | 79 ui::InputDeviceManager::GetInstance()->RemoveObserver(this); |
80 } | 80 } |
81 | 81 |
82 void VirtualKeyboardController::OnMaximizeModeStarted() { | 82 void VirtualKeyboardController::OnMaximizeModeStarted() { |
83 if (!IsSmartVirtualKeyboardEnabled()) { | 83 if (!IsSmartVirtualKeyboardEnabled()) { |
84 SetKeyboardEnabled(true); | 84 SetKeyboardEnabled(true); |
85 } else { | 85 } else { |
86 UpdateKeyboardEnabled(); | 86 UpdateKeyboardEnabled(); |
87 } | 87 } |
88 keyboard::SetOverscrollEnabledWithAccessibilityKeyboard(true); | |
89 } | 88 } |
90 | 89 |
91 void VirtualKeyboardController::OnMaximizeModeEnded() { | 90 void VirtualKeyboardController::OnMaximizeModeEnded() { |
92 if (!IsSmartVirtualKeyboardEnabled()) { | 91 if (!IsSmartVirtualKeyboardEnabled()) { |
93 SetKeyboardEnabled(false); | 92 SetKeyboardEnabled(false); |
94 } else { | 93 } else { |
95 UpdateKeyboardEnabled(); | 94 UpdateKeyboardEnabled(); |
96 } | 95 } |
97 keyboard::SetOverscrollEnabledWithAccessibilityKeyboard(false); | |
98 } | 96 } |
99 | 97 |
100 void VirtualKeyboardController::OnTouchscreenDeviceConfigurationChanged() { | 98 void VirtualKeyboardController::OnTouchscreenDeviceConfigurationChanged() { |
101 UpdateDevices(); | 99 UpdateDevices(); |
102 } | 100 } |
103 | 101 |
104 void VirtualKeyboardController::OnKeyboardDeviceConfigurationChanged() { | 102 void VirtualKeyboardController::OnKeyboardDeviceConfigurationChanged() { |
105 UpdateDevices(); | 103 UpdateDevices(); |
106 } | 104 } |
107 | 105 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 if (is_enabled == was_enabled) | 205 if (is_enabled == was_enabled) |
208 return; | 206 return; |
209 if (is_enabled) { | 207 if (is_enabled) { |
210 Shell::Get()->CreateKeyboard(); | 208 Shell::Get()->CreateKeyboard(); |
211 } else { | 209 } else { |
212 Shell::Get()->DeactivateKeyboard(); | 210 Shell::Get()->DeactivateKeyboard(); |
213 } | 211 } |
214 } | 212 } |
215 | 213 |
216 } // namespace ash | 214 } // namespace ash |
OLD | NEW |