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

Side by Side Diff: ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc

Issue 796803002: ozone: mouse button swap shouldn't affect touchpad physical click (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/ozone/evdev/libgestures_glue/gesture_property_provider.h ('k') | no next file » | 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/ozone/evdev/libgestures_glue/gesture_property_provider.h" 5 #include "ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h"
6 6
7 #include <gestures/gestures.h> 7 #include <gestures/gestures.h>
8 #include <libevdev/libevdev.h> 8 #include <libevdev/libevdev.h>
9 9
10 #include <fnmatch.h> 10 #include <fnmatch.h>
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 for (; it != device_map_.end(); ++it) { 857 for (; it != device_map_.end(); ++it) {
858 if (IsDeviceOfType(it->second, type)) { 858 if (IsDeviceOfType(it->second, type)) {
859 exists = true; 859 exists = true;
860 if (device_ids) 860 if (device_ids)
861 device_ids->push_back(it->first); 861 device_ids->push_back(it->first);
862 } 862 }
863 } 863 }
864 return exists; 864 return exists;
865 } 865 }
866 866
867 bool GesturePropertyProvider::IsDeviceIdOfType(const DeviceId device_id,
868 const EventDeviceType type) {
869 DeviceMap::const_iterator it = device_map_.find(device_id);
870 if (it == device_map_.end())
871 return false;
872 return IsDeviceOfType(it->second, type);
873 }
874
867 GesturesProp* GesturePropertyProvider::GetProperty(const DeviceId device_id, 875 GesturesProp* GesturePropertyProvider::GetProperty(const DeviceId device_id,
868 const std::string& name) { 876 const std::string& name) {
869 return FindProperty(device_id, name); 877 return FindProperty(device_id, name);
870 } 878 }
871 879
872 void GesturePropertyProvider::RegisterDevice(const DeviceId id, 880 void GesturePropertyProvider::RegisterDevice(const DeviceId id,
873 const DevicePtr device) { 881 const DevicePtr device) {
874 DeviceMap::const_iterator it = device_map_.find(id); 882 DeviceMap::const_iterator it = device_map_.find(id);
875 if (it != device_map_.end()) 883 if (it != device_map_.end())
876 return; 884 return;
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 const GesturesPropProvider kGesturePropProvider = { 1500 const GesturesPropProvider kGesturePropProvider = {
1493 GesturesPropFunctionsWrapper::CreateInt, 1501 GesturesPropFunctionsWrapper::CreateInt,
1494 GesturesPropFunctionsWrapper::CreateShort, 1502 GesturesPropFunctionsWrapper::CreateShort,
1495 GesturesPropFunctionsWrapper::CreateBool, 1503 GesturesPropFunctionsWrapper::CreateBool,
1496 GesturesPropFunctionsWrapper::CreateString, 1504 GesturesPropFunctionsWrapper::CreateString,
1497 GesturesPropFunctionsWrapper::CreateReal, 1505 GesturesPropFunctionsWrapper::CreateReal,
1498 GesturesPropFunctionsWrapper::RegisterHandlers, 1506 GesturesPropFunctionsWrapper::RegisterHandlers,
1499 GesturesPropFunctionsWrapper::Free}; 1507 GesturesPropFunctionsWrapper::Free};
1500 1508
1501 } // namespace ui 1509 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698