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

Side by Side Diff: ui/events/devices/x11/device_data_manager_x11.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: Fixed compile time issues across the failing platform builds. 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
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 "ui/events/devices/x11/device_data_manager_x11.h" 5 #include "ui/events/devices/x11/device_data_manager_x11.h"
6 6
7 #include <X11/extensions/XInput.h> 7 #include <X11/extensions/XInput.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 10
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 bool DeviceDataManagerX11::IsTouchDataType(const int type) { 126 bool DeviceDataManagerX11::IsTouchDataType(const int type) {
127 return (type >= kTouchDataTypeStart) && (type <= kTouchDataTypeEnd); 127 return (type >= kTouchDataTypeStart) && (type <= kTouchDataTypeEnd);
128 } 128 }
129 129
130 // static 130 // static
131 void DeviceDataManagerX11::CreateInstance() { 131 void DeviceDataManagerX11::CreateInstance() {
132 if (instance()) 132 if (instance())
133 return; 133 return;
134 134
135 DeviceDataManagerX11* device_data_manager = new DeviceDataManagerX11(); 135 DeviceDataManagerX11* device_data_manager = new DeviceDataManagerX11();
136
137 // TODO(bruthig): Replace the DeletePointer callbacks with explicit calls to
138 // DeviceDataManager::DeleteInstance.
136 base::AtExitManager::RegisterTask( 139 base::AtExitManager::RegisterTask(
137 base::Bind(&base::DeletePointer<DeviceDataManager>, device_data_manager)); 140 base::Bind(&base::DeletePointer<DeviceDataManager>, device_data_manager));
138 141
139 set_instance(device_data_manager); 142 set_instance(device_data_manager);
140 } 143 }
141 144
142 // static 145 // static
143 DeviceDataManagerX11* DeviceDataManagerX11::GetInstance() { 146 DeviceDataManagerX11* DeviceDataManagerX11::GetInstance() {
144 return static_cast<DeviceDataManagerX11*>(DeviceDataManager::GetInstance()); 147 return static_cast<DeviceDataManagerX11*>(DeviceDataManager::GetInstance());
145 } 148 }
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 } else { 779 } else {
777 keyboards.erase(it); 780 keyboards.erase(it);
778 ++blocked_iter; 781 ++blocked_iter;
779 } 782 }
780 } 783 }
781 // Notify base class of updated list. 784 // Notify base class of updated list.
782 DeviceDataManager::OnKeyboardDevicesUpdated(keyboards); 785 DeviceDataManager::OnKeyboardDevicesUpdated(keyboards);
783 } 786 }
784 787
785 } // namespace ui 788 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698