OLD | NEW |
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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 bool IsValidPattern(const std::string& pattern); | 673 bool IsValidPattern(const std::string& pattern); |
674 std::vector<std::string> vid_patterns_; | 674 std::vector<std::string> vid_patterns_; |
675 std::vector<std::string> pid_patterns_; | 675 std::vector<std::string> pid_patterns_; |
676 }; | 676 }; |
677 | 677 |
678 // Generic base class for device type math criteria. | 678 // Generic base class for device type math criteria. |
679 class MatchDeviceType : public MatchCriteria { | 679 class MatchDeviceType : public MatchCriteria { |
680 public: | 680 public: |
681 explicit MatchDeviceType(const std::string& arg); | 681 explicit MatchDeviceType(const std::string& arg); |
682 ~MatchDeviceType() override {} | 682 ~MatchDeviceType() override {} |
683 virtual bool Match(const DevicePtr device) = 0; | |
684 | 683 |
685 protected: | 684 protected: |
686 bool value_; | 685 bool value_; |
687 bool is_valid_; | 686 bool is_valid_; |
688 }; | 687 }; |
689 | 688 |
690 // Check if a device is a pointer device. | 689 // Check if a device is a pointer device. |
691 class MatchIsPointer : public MatchDeviceType { | 690 class MatchIsPointer : public MatchDeviceType { |
692 public: | 691 public: |
693 explicit MatchIsPointer(const std::string& arg); | 692 explicit MatchIsPointer(const std::string& arg); |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1547 const GesturesPropProvider kGesturePropProvider = { | 1546 const GesturesPropProvider kGesturePropProvider = { |
1548 GesturesPropFunctionsWrapper::CreateInt, | 1547 GesturesPropFunctionsWrapper::CreateInt, |
1549 GesturesPropFunctionsWrapper::CreateShort, | 1548 GesturesPropFunctionsWrapper::CreateShort, |
1550 GesturesPropFunctionsWrapper::CreateBool, | 1549 GesturesPropFunctionsWrapper::CreateBool, |
1551 GesturesPropFunctionsWrapper::CreateString, | 1550 GesturesPropFunctionsWrapper::CreateString, |
1552 GesturesPropFunctionsWrapper::CreateReal, | 1551 GesturesPropFunctionsWrapper::CreateReal, |
1553 GesturesPropFunctionsWrapper::RegisterHandlers, | 1552 GesturesPropFunctionsWrapper::RegisterHandlers, |
1554 GesturesPropFunctionsWrapper::Free}; | 1553 GesturesPropFunctionsWrapper::Free}; |
1555 | 1554 |
1556 } // namespace ui | 1555 } // namespace ui |
OLD | NEW |