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/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 10 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 } | 60 } |
61 | 61 |
62 void VirtualKeyboardController::OnTouchscreenDeviceConfigurationChanged() { | 62 void VirtualKeyboardController::OnTouchscreenDeviceConfigurationChanged() { |
63 UpdateDevices(); | 63 UpdateDevices(); |
64 } | 64 } |
65 | 65 |
66 void VirtualKeyboardController::OnKeyboardDeviceConfigurationChanged() { | 66 void VirtualKeyboardController::OnKeyboardDeviceConfigurationChanged() { |
67 UpdateDevices(); | 67 UpdateDevices(); |
68 } | 68 } |
69 | 69 |
70 void VirtualKeyboardController::OnMouseDeviceConfigurationChanged() { | |
71 } | |
72 | |
73 void VirtualKeyboardController::OnTouchpadDeviceConfigurationChanged() { | |
74 } | |
75 | |
76 void VirtualKeyboardController::ToggleIgnoreExternalKeyboard() { | 70 void VirtualKeyboardController::ToggleIgnoreExternalKeyboard() { |
77 ignore_external_keyboard_ = !ignore_external_keyboard_; | 71 ignore_external_keyboard_ = !ignore_external_keyboard_; |
78 UpdateKeyboardEnabled(); | 72 UpdateKeyboardEnabled(); |
79 } | 73 } |
80 | 74 |
81 void VirtualKeyboardController::UpdateDevices() { | 75 void VirtualKeyboardController::UpdateDevices() { |
82 ui::DeviceDataManager* device_data_manager = | 76 ui::DeviceDataManager* device_data_manager = |
83 ui::DeviceDataManager::GetInstance(); | 77 ui::DeviceDataManager::GetInstance(); |
84 | 78 |
85 // Checks for touchscreens. | 79 // Checks for touchscreens. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 keyboard::SetTouchKeyboardEnabled(enabled); | 116 keyboard::SetTouchKeyboardEnabled(enabled); |
123 if (enabled) { | 117 if (enabled) { |
124 Shell::GetInstance()->CreateKeyboard(); | 118 Shell::GetInstance()->CreateKeyboard(); |
125 } else { | 119 } else { |
126 if (!keyboard::IsKeyboardEnabled()) | 120 if (!keyboard::IsKeyboardEnabled()) |
127 Shell::GetInstance()->DeactivateKeyboard(); | 121 Shell::GetInstance()->DeactivateKeyboard(); |
128 } | 122 } |
129 } | 123 } |
130 | 124 |
131 } // namespace ash | 125 } // namespace ash |
OLD | NEW |