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

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: 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 unified diff | Download patch
« no previous file with comments | « ui/events/devices/device_data_manager.cc ('k') | ui/events/events.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 DeleteInstance callbacks with explicit calls.
136 base::AtExitManager::RegisterTask( 138 base::AtExitManager::RegisterTask(
137 base::Bind(&base::DeletePointer<DeviceDataManager>, device_data_manager)); 139 base::Bind(DeviceDataManager::DeleteInstance));
138 140
139 set_instance(device_data_manager); 141 set_instance(device_data_manager);
140 } 142 }
141 143
142 // static 144 // static
143 DeviceDataManagerX11* DeviceDataManagerX11::GetInstance() { 145 DeviceDataManagerX11* DeviceDataManagerX11::GetInstance() {
144 return static_cast<DeviceDataManagerX11*>(DeviceDataManager::GetInstance()); 146 return static_cast<DeviceDataManagerX11*>(DeviceDataManager::GetInstance());
145 } 147 }
146 148
147 DeviceDataManagerX11::DeviceDataManagerX11() 149 DeviceDataManagerX11::DeviceDataManagerX11()
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 } else { 778 } else {
777 keyboards.erase(it); 779 keyboards.erase(it);
778 ++blocked_iter; 780 ++blocked_iter;
779 } 781 }
780 } 782 }
781 // Notify base class of updated list. 783 // Notify base class of updated list.
782 DeviceDataManager::OnKeyboardDevicesUpdated(keyboards); 784 DeviceDataManager::OnKeyboardDevicesUpdated(keyboards);
783 } 785 }
784 786
785 } // namespace ui 787 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/devices/device_data_manager.cc ('k') | ui/events/events.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698