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

Side by Side Diff: ash/test/virtual_keyboard_test_helper.cc

Issue 845413002: touch: Change how touch-screen capability is processed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/touch/touch_transformer_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/test/virtual_keyboard_test_helper.h" 5 #include "ash/test/virtual_keyboard_test_helper.h"
6 6
7 #include "ui/events/devices/device_data_manager.h" 7 #include "ui/events/devices/device_data_manager.h"
8 #include "ui/events/devices/device_hotplug_event_observer.h" 8 #include "ui/events/devices/device_hotplug_event_observer.h"
9 #include "ui/events/devices/input_device.h" 9 #include "ui/events/devices/input_device.h"
10 #include "ui/events/devices/keyboard_device.h" 10 #include "ui/events/devices/keyboard_device.h"
11 #include "ui/events/devices/touchscreen_device.h" 11 #include "ui/events/devices/touchscreen_device.h"
12 12
13 namespace ash { 13 namespace ash {
14 namespace test { 14 namespace test {
15 15
16 void VirtualKeyboardTestHelper::SuppressKeyboard() { 16 void VirtualKeyboardTestHelper::SuppressKeyboard() {
17 ui::DeviceHotplugEventObserver* manager = 17 ui::DeviceHotplugEventObserver* manager =
18 ui::DeviceDataManager::GetInstance(); 18 ui::DeviceDataManager::GetInstance();
19 std::vector<ui::TouchscreenDevice> screens; 19 std::vector<ui::TouchscreenDevice> screens;
20 screens.push_back( 20 screens.push_back(
21 ui::TouchscreenDevice(1, 21 ui::TouchscreenDevice(1, ui::InputDeviceType::INPUT_DEVICE_INTERNAL,
22 ui::InputDeviceType::INPUT_DEVICE_INTERNAL, 22 "Touchscreen", gfx::Size(1024, 768), 0));
23 "Touchscreen",
24 gfx::Size(1024, 768)));
25 manager->OnTouchscreenDevicesUpdated(screens); 23 manager->OnTouchscreenDevicesUpdated(screens);
26 24
27 std::vector<ui::KeyboardDevice> keyboards; 25 std::vector<ui::KeyboardDevice> keyboards;
28 keyboards.push_back(ui::KeyboardDevice( 26 keyboards.push_back(ui::KeyboardDevice(
29 2, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); 27 2, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard"));
30 manager->OnKeyboardDevicesUpdated(keyboards); 28 manager->OnKeyboardDevicesUpdated(keyboards);
31 } 29 }
32 30
33 } // namespace test 31 } // namespace test
34 } // namespace ash 32 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/touch/touch_transformer_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698