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

Unified Diff: ui/events/ozone/evdev/touch_event_converter_evdev.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/ozone/evdev/touch_event_converter_evdev.h
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.h b/ui/events/ozone/evdev/touch_event_converter_evdev.h
deleted file mode 100644
index 83aa13ac1a8f819c684c2e96ed6f4c43b3eb620d..0000000000000000000000000000000000000000
--- a/ui/events/ozone/evdev/touch_event_converter_evdev.h
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_
-#define UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_
-
-#include <bitset>
-
-#include "base/compiler_specific.h"
-#include "base/files/file_path.h"
-#include "base/message_loop/message_pump_libevent.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/ozone/evdev/event_converter_evdev.h"
-#include "ui/events/ozone/evdev/event_device_info.h"
-#include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
-
-namespace ui {
-
-class TouchEvent;
-
-class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
- : public EventConverterEvdev {
- public:
- enum {
- MAX_FINGERS = 11
- };
- TouchEventConverterEvdev(int fd,
- base::FilePath path,
- int id,
- const EventDeviceInfo& info,
- const EventDispatchCallback& dispatch);
- virtual ~TouchEventConverterEvdev();
-
- // EventConverterEvdev:
- virtual bool HasTouchscreen() const override;
- virtual gfx::Size GetTouchscreenSize() const override;
-
- private:
- friend class MockTouchEventConverterEvdev;
-
- // Unsafe part of initialization.
- void Init(const EventDeviceInfo& info);
-
- // Overidden from base::MessagePumpLibevent::Watcher.
- virtual void OnFileCanReadWithoutBlocking(int fd) override;
-
- virtual bool Reinitialize();
-
- void ProcessInputEvent(const input_event& input);
- void ProcessAbs(const input_event& input);
- void ProcessSyn(const input_event& input);
-
- void ReportEvents(base::TimeDelta delta);
-
- // Callback for dispatching events.
- EventDispatchCallback callback_;
-
- // Set if we have seen a SYN_DROPPED and not yet re-synced with the device.
- bool syn_dropped_;
-
- // Set if this is a type A device (uses SYN_MT_REPORT).
- bool is_type_a_;
-
- // Pressure values.
- int pressure_min_;
- int pressure_max_; // Used to normalize pressure values.
-
- // Input range for x-axis.
- float x_min_tuxels_;
- float x_num_tuxels_;
-
- // Input range for y-axis.
- float y_min_tuxels_;
- float y_num_tuxels_;
-
- // Output range for x-axis.
- float x_min_pixels_;
- float x_num_pixels_;
-
- // Output range for y-axis.
- 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_;
-
- // Bit field tracking which in-progress touch points have been modified
- // without a syn event.
- std::bitset<MAX_FINGERS> altered_slots_;
-
- struct InProgressEvents {
- float x_;
- float y_;
- int id_; // Device reported "unique" touch point id; -1 means not active
- int finger_; // "Finger" id starting from 0; -1 means not active
-
- EventType type_;
- float radius_x_;
- float radius_y_;
- float pressure_;
- };
-
- // In-progress touch points.
- InProgressEvents events_[MAX_FINGERS];
-
- DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev);
-};
-
-} // namespace ui
-
-#endif // UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_
« no previous file with comments | « ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.cc ('k') | ui/events/ozone/evdev/touch_event_converter_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698