| 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 #ifndef UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ |
| 6 #define UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ |
| 7 | 7 |
| 8 #include <bitset> | 8 #include <bitset> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev | 22 class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev |
| 23 : public EventConverterEvdev { | 23 : public EventConverterEvdev { |
| 24 public: | 24 public: |
| 25 enum { | 25 enum { |
| 26 MAX_FINGERS = 11 | 26 MAX_FINGERS = 11 |
| 27 }; | 27 }; |
| 28 TouchEventConverterEvdev(int fd, | 28 TouchEventConverterEvdev(int fd, |
| 29 base::FilePath path, | 29 base::FilePath path, |
| 30 int id, | 30 int id, |
| 31 InputDeviceType type, |
| 31 const EventDispatchCallback& dispatch); | 32 const EventDispatchCallback& dispatch); |
| 32 ~TouchEventConverterEvdev() override; | 33 ~TouchEventConverterEvdev() override; |
| 33 | 34 |
| 34 // EventConverterEvdev: | 35 // EventConverterEvdev: |
| 35 bool HasTouchscreen() const override; | 36 bool HasTouchscreen() const override; |
| 36 gfx::Size GetTouchscreenSize() const override; | 37 gfx::Size GetTouchscreenSize() const override; |
| 37 bool IsInternal() const override; | |
| 38 | 38 |
| 39 // Unsafe part of initialization. | 39 // Unsafe part of initialization. |
| 40 virtual void Initialize(const EventDeviceInfo& info); | 40 virtual void Initialize(const EventDeviceInfo& info); |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 friend class MockTouchEventConverterEvdev; | 43 friend class MockTouchEventConverterEvdev; |
| 44 | 44 |
| 45 struct InProgressEvents { | 45 struct InProgressEvents { |
| 46 InProgressEvents(); | 46 InProgressEvents(); |
| 47 | 47 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // Touch point currently being updated from the /dev/input/event* stream. | 96 // Touch point currently being updated from the /dev/input/event* stream. |
| 97 int current_slot_; | 97 int current_slot_; |
| 98 | 98 |
| 99 // Bit field tracking which in-progress touch points have been modified | 99 // Bit field tracking which in-progress touch points have been modified |
| 100 // without a syn event. | 100 // without a syn event. |
| 101 std::bitset<MAX_FINGERS> altered_slots_; | 101 std::bitset<MAX_FINGERS> altered_slots_; |
| 102 | 102 |
| 103 // In-progress touch points. | 103 // In-progress touch points. |
| 104 InProgressEvents events_[MAX_FINGERS]; | 104 InProgressEvents events_[MAX_FINGERS]; |
| 105 | 105 |
| 106 bool is_internal_; | |
| 107 | |
| 108 DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev); | 106 DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev); |
| 109 }; | 107 }; |
| 110 | 108 |
| 111 } // namespace ui | 109 } // namespace ui |
| 112 | 110 |
| 113 #endif // UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ | 111 #endif // UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ |
| OLD | NEW |