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

Unified 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: Added logging.h include to device_data_manager_test_api_stub.cc. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/test/device_data_manager_test_api.h ('k') | ui/events/test/device_data_manager_test_api_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/test/device_data_manager_test_api_impl.cc
diff --git a/ui/events/test/device_data_manager_test_api_impl.cc b/ui/events/test/device_data_manager_test_api_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..92ff62be795fa379565c9a3c0d20f9c7fec2ad88
--- /dev/null
+++ b/ui/events/test/device_data_manager_test_api_impl.cc
@@ -0,0 +1,61 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/events/test/device_data_manager_test_api.h"
+
+#include "ui/events/devices/device_data_manager.h"
+
+namespace ui {
+namespace test {
+
+DeviceDataManagerTestAPI::DeviceDataManagerTestAPI()
+ : should_delete_instance_(false) {
+}
+
+DeviceDataManagerTestAPI::~DeviceDataManagerTestAPI() {
+ if (should_delete_instance_)
+ DeviceDataManager::DeleteInstance();
+}
+
+bool DeviceDataManagerTestAPI::CreateDeviceDataManagerInstance() {
+ should_delete_instance_ = true;
+ DeviceDataManager::DeleteInstance();
+ DeviceDataManager::set_instance(new DeviceDataManager());
+ return true;
+}
+
+void DeviceDataManagerTestAPI::
+ NotifyObserversTouchscreenDeviceConfigurationChanged() {
+ DeviceDataManager::GetInstance()
+ ->NotifyObserversTouchscreenDeviceConfigurationChanged();
+}
+
+void DeviceDataManagerTestAPI::
+ NotifyObserversKeyboardDeviceConfigurationChanged() {
+ DeviceDataManager::GetInstance()
+ ->NotifyObserversKeyboardDeviceConfigurationChanged();
+}
+
+void DeviceDataManagerTestAPI::
+ NotifyObserversMouseDeviceConfigurationChanged() {
+ DeviceDataManager::GetInstance()
+ ->NotifyObserversMouseDeviceConfigurationChanged();
+}
+
+void DeviceDataManagerTestAPI::
+ NotifyObserversTouchpadDeviceConfigurationChanged() {
+ DeviceDataManager::GetInstance()
+ ->NotifyObserversTouchpadDeviceConfigurationChanged();
+}
+
+void DeviceDataManagerTestAPI::NotifyObserversDeviceListsComplete() {
+ DeviceDataManager::GetInstance()->NotifyObserversDeviceListsComplete();
+}
+
+void DeviceDataManagerTestAPI::OnDeviceListsComplete() {
+ DeviceDataManager::GetInstance()->OnDeviceListsComplete();
+}
+
+} // namespace test
+} // namespace ui
« no previous file with comments | « ui/events/test/device_data_manager_test_api.h ('k') | ui/events/test/device_data_manager_test_api_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698