Commit deebfe92 authored by sadrul@chromium.org's avatar sadrul@chromium.org

views: Remove dependency on ui::TouchEvent/GestureEvent from views.

BUG=125937

Review URL: https://chromiumcodereview.appspot.com/10829262

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150915 0039d316-1c4b-4281-b951-d872f2087c98
parent f5090b44
...@@ -123,42 +123,6 @@ TouchEvent::TouchEvent(const TouchEvent& model, View* source, View* target) ...@@ -123,42 +123,6 @@ TouchEvent::TouchEvent(const TouchEvent& model, View* source, View* target)
TouchEvent::~TouchEvent() { TouchEvent::~TouchEvent() {
} }
ui::EventType TouchEvent::GetEventType() const {
return type();
}
gfx::Point TouchEvent::GetLocation() const {
return location();
}
int TouchEvent::GetTouchId() const {
return touch_id_;
}
int TouchEvent::GetEventFlags() const {
return flags();
}
base::TimeDelta TouchEvent::GetTimestamp() const {
return base::TimeDelta::FromMilliseconds(time_stamp().ToDoubleT() * 1000);
}
float TouchEvent::RadiusX() const {
return radius_x_;
}
float TouchEvent::RadiusY() const {
return radius_y_;
}
float TouchEvent::RotationAngle() const {
return rotation_angle_;
}
float TouchEvent::Force() const {
return force_;
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// TouchEvent, private: // TouchEvent, private:
...@@ -208,13 +172,6 @@ GestureEvent::GestureEvent(ui::EventType type, int x, int y, int flags) ...@@ -208,13 +172,6 @@ GestureEvent::GestureEvent(ui::EventType type, int x, int y, int flags)
GestureEvent::~GestureEvent() { GestureEvent::~GestureEvent() {
} }
#if !defined(USE_AURA)
int GestureEvent::GetLowestTouchId() const {
// TODO:
return 0;
}
#endif
GestureEventForTest::GestureEventForTest(ui::EventType type, GestureEventForTest::GestureEventForTest(ui::EventType type,
int x, int x,
int y, int y,
......
...@@ -219,8 +219,7 @@ class VIEWS_EXPORT MouseEvent : public LocatedEvent { ...@@ -219,8 +219,7 @@ class VIEWS_EXPORT MouseEvent : public LocatedEvent {
// TouchEvent and PlatformTouchPoint. // TouchEvent and PlatformTouchPoint.
// //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class VIEWS_EXPORT TouchEvent : public LocatedEvent, class VIEWS_EXPORT TouchEvent : public LocatedEvent {
public ui::TouchEvent {
public: public:
explicit TouchEvent(const NativeEvent& native_event); explicit TouchEvent(const NativeEvent& native_event);
...@@ -249,17 +248,6 @@ class VIEWS_EXPORT TouchEvent : public LocatedEvent, ...@@ -249,17 +248,6 @@ class VIEWS_EXPORT TouchEvent : public LocatedEvent,
float rotation_angle() const { return rotation_angle_; } float rotation_angle() const { return rotation_angle_; }
float force() const { return force_; } float force() const { return force_; }
// Overridden from ui::TouchEvent.
virtual ui::EventType GetEventType() const OVERRIDE;
virtual gfx::Point GetLocation() const OVERRIDE;
virtual int GetTouchId() const OVERRIDE;
virtual int GetEventFlags() const OVERRIDE;
virtual base::TimeDelta GetTimestamp() const OVERRIDE;
virtual float RadiusX() const OVERRIDE;
virtual float RadiusY() const OVERRIDE;
virtual float RotationAngle() const OVERRIDE;
virtual float Force() const OVERRIDE;
private: private:
friend class internal::RootView; friend class internal::RootView;
...@@ -377,8 +365,7 @@ class VIEWS_EXPORT ScrollEvent : public MouseEvent { ...@@ -377,8 +365,7 @@ class VIEWS_EXPORT ScrollEvent : public MouseEvent {
// GestureEvent class // GestureEvent class
// //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
class VIEWS_EXPORT GestureEvent : public LocatedEvent, class VIEWS_EXPORT GestureEvent : public LocatedEvent {
public ui::GestureEvent {
public: public:
explicit GestureEvent(const NativeEvent& native_event); explicit GestureEvent(const NativeEvent& native_event);
...@@ -399,9 +386,6 @@ class VIEWS_EXPORT GestureEvent : public LocatedEvent, ...@@ -399,9 +386,6 @@ class VIEWS_EXPORT GestureEvent : public LocatedEvent,
GestureEvent(const GestureEvent& model, View* root); GestureEvent(const GestureEvent& model, View* root);
// Overridden from ui::GestureEvent.
virtual int GetLowestTouchId() const OVERRIDE;
ui::GestureEventDetails details_; ui::GestureEventDetails details_;
DISALLOW_COPY_AND_ASSIGN(GestureEvent); DISALLOW_COPY_AND_ASSIGN(GestureEvent);
......
...@@ -56,9 +56,4 @@ GestureEvent::GestureEvent(const NativeEvent& event) ...@@ -56,9 +56,4 @@ GestureEvent::GestureEvent(const NativeEvent& event)
details_(static_cast<ui::GestureEventImpl*>(event)->details()) { details_(static_cast<ui::GestureEventImpl*>(event)->details()) {
} }
int GestureEvent::GetLowestTouchId() const {
return native_event() ? static_cast<ui::GestureEventImpl*>(
native_event())->GetLowestTouchId() : 0;
}
} // namespace views } // namespace views
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment