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

Unified Diff: ash/virtual_keyboard_controller.cc

Issue 2028593004: Add new InputDeviceManager interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_keyboard
Patch Set: Fix windows compile error. Created 4 years, 7 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_controller.cc
diff --git a/ash/virtual_keyboard_controller.cc b/ash/virtual_keyboard_controller.cc
index 94fcd39373a85be78ddd376824991395769f1071..b08c5059a7224828a27e4b90d4c4367765f475f2 100644
--- a/ash/virtual_keyboard_controller.cc
+++ b/ash/virtual_keyboard_controller.cc
@@ -11,8 +11,8 @@
#include "ash/wm/maximize_mode/maximize_mode_controller.h"
#include "base/command_line.h"
#include "base/strings/string_util.h"
-#include "ui/events/devices/device_data_manager.h"
#include "ui/events/devices/input_device.h"
+#include "ui/events/devices/input_device_manager.h"
#include "ui/events/devices/touchscreen_device.h"
#include "ui/keyboard/keyboard_switches.h"
#include "ui/keyboard/keyboard_util.h"
@@ -37,13 +37,13 @@ VirtualKeyboardController::VirtualKeyboardController()
has_touchscreen_(false),
ignore_external_keyboard_(false) {
Shell::GetInstance()->AddShellObserver(this);
- ui::DeviceDataManager::GetInstance()->AddObserver(this);
+ ui::InputDeviceManager::GetInstance()->AddObserver(this);
UpdateDevices();
}
VirtualKeyboardController::~VirtualKeyboardController() {
Shell::GetInstance()->RemoveShellObserver(this);
- ui::DeviceDataManager::GetInstance()->RemoveObserver(this);
+ ui::InputDeviceManager::GetInstance()->RemoveObserver(this);
}
void VirtualKeyboardController::OnMaximizeModeStarted() {
@@ -76,17 +76,17 @@ void VirtualKeyboardController::ToggleIgnoreExternalKeyboard() {
}
void VirtualKeyboardController::UpdateDevices() {
- ui::DeviceDataManager* device_data_manager =
- ui::DeviceDataManager::GetInstance();
+ ui::InputDeviceManager* device_data_manager =
+ ui::InputDeviceManager::GetInstance();
// Checks for touchscreens.
- has_touchscreen_ = device_data_manager->touchscreen_devices().size() > 0;
+ has_touchscreen_ = device_data_manager->GetTouchscreenDevices().size() > 0;
// Checks for keyboards.
has_external_keyboard_ = false;
has_internal_keyboard_ = false;
for (const ui::InputDevice& device :
- device_data_manager->keyboard_devices()) {
+ device_data_manager->GetKeyboardDevices()) {
if (has_internal_keyboard_ && has_external_keyboard_)
break;
ui::InputDeviceType type = device.type;
« no previous file with comments | « ash/touch/touch_transformer_controller.cc ('k') | ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698