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

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: Changed DeviceDataManagerTestAPI::delete_instance_ to should_delete_instance_. 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
« no previous file with comments | « ui/events/events.gyp ('k') | ui/events/test/device_data_manager_test_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Constructs a test api that provides access to the global DeviceDataManager
22 // instance that is accessible by DeviceDataManager::GetInstance().
23 explicit DeviceDataManagerTestAPI();
sadrul 2015/07/10 22:29:54 No explicit
bruthig 2015/07/10 22:42:09 Done.
24
25 // Will call DeviceDataManager::DeleteInstance() if
26 // CreateDeviceDataManagerInstance() was used to create a new instance.
27 ~DeviceDataManagerTestAPI();
28
29 // Creates a new ui::DeviceDataManager and sets it as the global instance.
30 // i.e. It is accessible via ui::DeviceDataManager::GetInstance(). If the
31 // DeviceDataManager already owns an instance it will be deleted using
32 // DeviceDataManager::DeleteInstance().
33 //
34 // Note: The ui::DeviceDataManager is not available on all platforms, thus
35 // this returns true when it is possible to instantiate a
36 // ui::DeviceDataManager instance and false otherwise.
37 bool CreateDeviceDataManagerInstance();
38
39 // Wrapper functions to DeviceDataManager.
40 void NotifyObserversTouchscreenDeviceConfigurationChanged();
41 void NotifyObserversKeyboardDeviceConfigurationChanged();
42 void NotifyObserversMouseDeviceConfigurationChanged();
43 void NotifyObserversTouchpadDeviceConfigurationChanged();
44 void NotifyObserversDeviceListsComplete();
45 void OnDeviceListsComplete();
46
47 private:
48 // Tracks whether DeviceDataManager::DeleteInstance() should be called during
49 // destruction.
50 bool should_delete_instance_;
51
52 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerTestAPI);
53 };
54
55 } // namespace test
56 } // namespace ui
57
58 #endif // UI_EVENTS_TEST_DEVICE_DATA_MANAGER_TEST_API_H_
OLDNEW
« no previous file with comments | « ui/events/events.gyp ('k') | ui/events/test/device_data_manager_test_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698