summaryrefslogtreecommitdiffstats
path: root/ui/events/event.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui/events/event.h')
-rw-r--r--ui/events/event.h70
1 files changed, 3 insertions, 67 deletions
diff --git a/ui/events/event.h b/ui/events/event.h
index ca383d7..35999bf 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -6,6 +6,7 @@
#define UI_EVENTS_EVENT_H_
#include <stdint.h>
+
#include "base/compiler_specific.h"
#include "base/event_types.h"
#include "base/gtest_prod_util.h"
@@ -26,10 +27,6 @@ namespace gfx {
class Transform;
}
-namespace IPC {
-template <class P> struct ParamTraits;
-}
-
namespace ui {
class EventTarget;
class KeyEvent;
@@ -39,10 +36,6 @@ class PointerEvent;
class ScrollEvent;
class TouchEvent;
enum class DomCode;
-class Event;
-class MouseWheelEvent;
-
-using ScopedEvent = scoped_ptr<Event>;
class EVENTS_EXPORT Event {
public:
@@ -289,9 +282,6 @@ class EVENTS_EXPORT Event {
private:
friend class EventTestApi;
- // For (de)serialization.
- friend struct IPC::ParamTraits<ui::ScopedEvent>;
-
EventType type_;
std::string name_;
base::TimeDelta time_stamp_;
@@ -313,13 +303,6 @@ class EVENTS_EXPORT CancelModeEvent : public Event {
public:
CancelModeEvent();
~CancelModeEvent() override;
-
- private:
- // For (de)serialization.
- CancelModeEvent(EventType type, base::TimeDelta time_stamp, int flags)
- : Event(type, time_stamp, flags) {}
- friend struct IPC::ParamTraits<ui::ScopedEvent>;
- friend struct IPC::ParamTraits<ui::CancelModeEvent>;
};
class EVENTS_EXPORT LocatedEvent : public Event {
@@ -363,13 +346,6 @@ class EVENTS_EXPORT LocatedEvent : public Event {
protected:
friend class LocatedEventTestApi;
-
- // For (de)serialization.
- LocatedEvent(EventType type, base::TimeDelta time_stamp, int flags)
- : Event(type, time_stamp, flags) {}
- friend struct IPC::ParamTraits<ui::ScopedEvent>;
- friend struct IPC::ParamTraits<ui::LocatedEvent>;
-
explicit LocatedEvent(const base::NativeEvent& native_event);
// Create a new LocatedEvent which is identical to the provided model.
@@ -430,9 +406,6 @@ struct EVENTS_EXPORT PointerDetails {
tilt_y == other.tilt_y;
}
- // For serialization.
- friend struct IPC::ParamTraits<ui::PointerDetails>;
-
// The type of pointer device.
EventPointerType pointer_type = EventPointerType::POINTER_TYPE_UNKNOWN;
@@ -552,13 +525,6 @@ class EVENTS_EXPORT MouseEvent : public LocatedEvent {
pointer_details_ = details;
}
- protected:
- // For (de)serialization.
- MouseEvent(EventType type, base::TimeDelta time_stamp, int flags)
- : LocatedEvent(type, time_stamp, flags) {}
- friend struct IPC::ParamTraits<ui::ScopedEvent>;
- friend struct IPC::ParamTraits<ui::MouseEvent>;
-
private:
FRIEND_TEST_ALL_PREFIXES(EventTest, DoubleClickRequiresRelease);
FRIEND_TEST_ALL_PREFIXES(EventTest, SingleClickRightLeft);
@@ -619,12 +585,6 @@ class EVENTS_EXPORT MouseWheelEvent : public MouseEvent {
const gfx::Vector2d& offset() const { return offset_; }
private:
- // For (de)serialization.
- MouseWheelEvent(EventType type, base::TimeDelta time_stamp, int flags)
- : MouseEvent(type, time_stamp, flags) {}
- friend struct IPC::ParamTraits<ui::ScopedEvent>;
- friend struct IPC::ParamTraits<ui::MouseWheelEvent>;
-
gfx::Vector2d offset_;
};
@@ -697,22 +657,15 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
}
private:
- // For (de)serialization.
- TouchEvent(EventType type, base::TimeDelta time_stamp, int flags)
- : LocatedEvent(type, time_stamp, flags),
- should_remove_native_touch_id_mapping_(false) {}
- friend struct IPC::ParamTraits<ui::ScopedEvent>;
- friend struct IPC::ParamTraits<ui::TouchEvent>;
-
// Adjusts rotation_angle_ to within the acceptable range.
void FixRotationAngle();
// The identity (typically finger) of the touch starting at 0 and incrementing
// for each separable additional touch that the hardware can detect.
- int touch_id_;
+ const int touch_id_;
// A unique identifier for the touch event.
- uint32_t unique_event_id_;
+ const uint32_t unique_event_id_;
// Clockwise angle (in degrees) of the major axis from the X axis. Must be
// less than 180 and non-negative.
@@ -922,11 +875,6 @@ class EVENTS_EXPORT KeyEvent : public Event {
void set_is_char(bool is_char) { is_char_ = is_char; }
private:
- // For (de)serialization.
- KeyEvent(EventType type, base::TimeDelta time_stamp, int flags);
- friend struct IPC::ParamTraits<ui::ScopedEvent>;
- friend struct IPC::ParamTraits<ui::KeyEvent>;
-
// Determine key_ on a keystroke event from code_ and flags().
void ApplyLayout() const;
@@ -1005,12 +953,6 @@ class EVENTS_EXPORT ScrollEvent : public MouseEvent {
int finger_count() const { return finger_count_; }
private:
- // For (de)serialization.
- ScrollEvent(EventType type, base::TimeDelta time_stamp, int flags)
- : MouseEvent(type, time_stamp, flags) {}
- friend struct IPC::ParamTraits<ui::ScopedEvent>;
- friend struct IPC::ParamTraits<ui::ScrollEvent>;
-
// Potential accelerated offsets.
float x_offset_;
float y_offset_;
@@ -1043,12 +985,6 @@ class EVENTS_EXPORT GestureEvent : public LocatedEvent {
const GestureEventDetails& details() const { return details_; }
private:
- // For (de)serialization.
- GestureEvent(EventType type, base::TimeDelta time_stamp, int flags)
- : LocatedEvent(type, time_stamp, flags) {}
- friend struct IPC::ParamTraits<ui::ScopedEvent>;
- friend struct IPC::ParamTraits<ui::GestureEvent>;
-
GestureEventDetails details_;
};