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

Unified Diff: ui/events/event.h

Issue 1755703004: Revert of IPC::ParamTraits for ui::Event (towards ui::Events over mojo IPC) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « components/mus/common/mus_ipc_export.h ('k') | ui/events/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.h
diff --git a/ui/events/event.h b/ui/events/event.h
index bb98f7ec8ae85bb36c8c3560dc48d5470cd772bb..1679dc03f944a8f2feaff85691e91191e391c7be 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 @@
class Transform;
}
-namespace IPC {
-template <class P> struct ParamTraits;
-}
-
namespace ui {
class EventTarget;
class KeyEvent;
@@ -37,10 +34,6 @@
class PointerEvent;
class TouchEvent;
enum class DomCode;
-class Event;
-class MouseWheelEvent;
-
-using ScopedEvent = scoped_ptr<Event>;
class EVENTS_EXPORT Event {
public:
@@ -276,9 +269,6 @@
private:
friend class EventTestApi;
- // For (de)serialization.
- friend struct IPC::ParamTraits<ui::ScopedEvent>;
-
EventType type_;
std::string name_;
base::TimeDelta time_stamp_;
@@ -300,13 +290,6 @@
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 {
@@ -350,13 +333,6 @@
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.
@@ -417,9 +393,6 @@
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;
@@ -539,13 +512,6 @@
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);
@@ -606,12 +572,6 @@
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_;
};
@@ -684,22 +644,15 @@
}
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.
@@ -909,11 +862,6 @@
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;
@@ -992,12 +940,6 @@
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_;
@@ -1030,12 +972,6 @@
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_;
};
« no previous file with comments | « components/mus/common/mus_ipc_export.h ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698