};
TouchEventConverterEvdev(int fd,
base::FilePath path,
+ int id,
const EventDeviceInfo& info,
const EventDispatchCallback& dispatch);
- virtual ~TouchEventConverterEvdev();
+ ~TouchEventConverterEvdev() override;
+
+ // EventConverterEvdev:
+ bool HasTouchscreen() const override;
+ gfx::Size GetTouchscreenSize() const override;
+ bool IsInternal() const override;
private:
friend class MockTouchEventConverterEvdev;
void Init(const EventDeviceInfo& info);
// Overidden from base::MessagePumpLibevent::Watcher.
- virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
+ void OnFileCanReadWithoutBlocking(int fd) override;
virtual bool Reinitialize();
float y_min_pixels_;
float y_num_pixels_;
+ // Size of the touchscreen as reported by the driver.
+ gfx::Size native_size_;
+
// Touch point currently being updated from the /dev/input/event* stream.
int current_slot_;
std::bitset<MAX_FINGERS> altered_slots_;
struct InProgressEvents {
+ InProgressEvents();
+
float x_;
float y_;
int id_; // Device reported "unique" touch point id; -1 means not active
// In-progress touch points.
InProgressEvents events_[MAX_FINGERS];
+ bool is_internal_;
+
DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev);
};