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

Side by Side Diff: ui/events/test/device_data_manager_test_api_impl.cc

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: Addressed sadrul@'s comments from patch set 12. 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 #include "ui/events/test/device_data_manager_test_api.h"
6
7 #include "ui/events/devices/device_data_manager.h"
8
9 namespace ui {
10 namespace test {
11
12 DeviceDataManagerTestAPI::DeviceDataManagerTestAPI(bool delete_instance)
13 : delete_instance_(delete_instance) {
14 }
15
16 DeviceDataManagerTestAPI::~DeviceDataManagerTestAPI() {
17 if (delete_instance_)
18 DeviceDataManager::DeleteInstance();
19 }
20
21 bool DeviceDataManagerTestAPI::CreateDeviceDataManagerInstance() {
22 DeviceDataManager::DeleteInstance();
23 DeviceDataManager::set_instance(new DeviceDataManager());
24 return true;
25 }
26
27 void DeviceDataManagerTestAPI::
28 NotifyObserversTouchscreenDeviceConfigurationChanged() {
29 DeviceDataManager::GetInstance()
30 ->NotifyObserversTouchscreenDeviceConfigurationChanged();
31 }
32
33 void DeviceDataManagerTestAPI::
34 NotifyObserversKeyboardDeviceConfigurationChanged() {
35 DeviceDataManager::GetInstance()
36 ->NotifyObserversKeyboardDeviceConfigurationChanged();
37 }
38
39 void DeviceDataManagerTestAPI::
40 NotifyObserversMouseDeviceConfigurationChanged() {
41 DeviceDataManager::GetInstance()
42 ->NotifyObserversMouseDeviceConfigurationChanged();
43 }
44
45 void DeviceDataManagerTestAPI::
46 NotifyObserversTouchpadDeviceConfigurationChanged() {
47 DeviceDataManager::GetInstance()
48 ->NotifyObserversTouchpadDeviceConfigurationChanged();
49 }
50
51 void DeviceDataManagerTestAPI::NotifyObserversDeviceListsComplete() {
52 DeviceDataManager::GetInstance()->NotifyObserversDeviceListsComplete();
53 }
54
55 void DeviceDataManagerTestAPI::OnDeviceListsComplete() {
56 DeviceDataManager::GetInstance()->OnDeviceListsComplete();
57 }
58
59 } // namespace test
60 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698