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

Side by Side Diff: ui/events/test/device_data_manager_test_api.h

Issue 1182303005: Fixed the Touchscreen.TouchEventsEnabled histogram to record the correct values on X11 and Ozone ba… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created gfx::test::TestScreen and addressed other comments. Created 5 years, 5 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_EVENTS_TEST_DEVICE_DATA_MANAGER_TEST_API_H_
6 #define UI_EVENTS_TEST_DEVICE_DATA_MANAGER_TEST_API_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/events/devices/events_devices_export.h"
11
12 namespace ui {
13
14 class DeviceDataManager;
15
16 namespace test {
17
18 // Test API class to access internals of the DeviceDataManager class.
19 class DeviceDataManagerTestAPI {
20 public:
21 DeviceDataManagerTestAPI();
22 ~DeviceDataManagerTestAPI();
23
24 // Creates a new ui::DeviceDataManager and sets it as the global instance.
25 // i.e. It is accessible via ui::DeviceDataManager::GetInstance().
26 //
27 // Note: The ui::DeviceDataManager is not available on all platforms, thus
28 // this returns true when it is possible to instantiate a
29 // ui::DeviceDataManager instance and false otherwise.
30 bool CreateDeviceDataManagerInstance();
31
32 // Wrapper functions to DeviceDataManager.
33 void NotifyObserversTouchscreenDeviceConfigurationChanged();
34 void NotifyObserversKeyboardDeviceConfigurationChanged();
35 void NotifyObserversMouseDeviceConfigurationChanged();
36 void NotifyObserversTouchpadDeviceConfigurationChanged();
37 void NotifyObserversDeviceListsComplete();
38 void OnDeviceListsComplete();
39
40 private:
41 // The internal DeviceDataManger instance. Accessible via
42 // DeviceDataManager::GetInstance().
43 scoped_ptr<ui::DeviceDataManager> device_data_manager_;
44
45 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerTestAPI);
46 };
47
48 } // namespace test
49 } // namespace ui
50
51 #endif // UI_EVENTS_TEST_DEVICE_DATA_MANAGER_TEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698