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

Unified Diff: ui/views/events/event.cc

Issue 10828265: Replace views::LocatedEvent with ui::LocatedEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « ui/views/events/event.h ('k') | ui/views/events/event_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/events/event.cc
===================================================================
--- ui/views/events/event.cc (revision 151267)
+++ ui/views/events/event.cc (working copy)
@@ -12,46 +12,13 @@
namespace views {
////////////////////////////////////////////////////////////////////////////////
-// LocatedEvent, protected:
-
-#if !defined(USE_AURA)
-LocatedEvent::LocatedEvent(const ui::NativeEvent& native_event)
- : Event(native_event,
- ui::EventTypeFromNative(native_event),
- ui::EventFlagsFromNative(native_event)),
- location_(ui::EventLocationFromNative(native_event)) {
-}
-#endif
-
-// TODO(msw): Kill this legacy constructor when we update uses.
-LocatedEvent::LocatedEvent(ui::EventType type,
- const gfx::Point& location,
- int flags)
- : Event(type, flags),
- location_(location) {
-}
-
-LocatedEvent::LocatedEvent(const LocatedEvent& model,
- View* source,
- View* target)
- : Event(model),
- location_(model.location_) {
- if (target && target != source)
- View::ConvertPointToView(source, target, &location_);
-}
-
-LocatedEvent::LocatedEvent(const LocatedEvent& model, View* root)
- : Event(model),
- location_(model.location_) {
- View::ConvertPointFromWidget(root, &location_);
-}
-
-////////////////////////////////////////////////////////////////////////////////
// MouseEvent, public:
+#if !defined(USE_AURA)
MouseEvent::MouseEvent(const ui::NativeEvent& native_event)
: LocatedEvent(native_event) {
}
+#endif
MouseEvent::MouseEvent(const MouseEvent& model, View* source, View* target)
: LocatedEvent(model, source, target) {
@@ -85,7 +52,7 @@
float radius_y,
float angle,
float force)
- : LocatedEvent(type, gfx::Point(x, y), flags),
+ : LocatedEvent(type, gfx::Point(x, y), gfx::Point(x, y), flags),
touch_id_(touch_id),
radius_x_(radius_x),
radius_y_(radius_y),
@@ -106,18 +73,6 @@
}
////////////////////////////////////////////////////////////////////////////////
-// TouchEvent, private:
-
-TouchEvent::TouchEvent(const TouchEvent& model, View* root)
- : LocatedEvent(model, root),
- touch_id_(model.touch_id_),
- radius_x_(model.radius_x_),
- radius_y_(model.radius_y_),
- rotation_angle_(model.rotation_angle_),
- force_(model.force_) {
-}
-
-////////////////////////////////////////////////////////////////////////////////
// MouseWheelEvent, public:
#if defined(OS_WIN)
@@ -141,13 +96,8 @@
////////////////////////////////////////////////////////////////////////////////
// GestureEvent, private:
-GestureEvent::GestureEvent(const GestureEvent& model, View* root)
- : LocatedEvent(model, root),
- details_(model.details_) {
-}
-
GestureEvent::GestureEvent(ui::EventType type, int x, int y, int flags)
- : LocatedEvent(type, gfx::Point(x, y), flags),
+ : LocatedEvent(type, gfx::Point(x, y), gfx::Point(x, y), flags),
details_(type, 0.f, 0.f) {
}
« no previous file with comments | « ui/views/events/event.h ('k') | ui/views/events/event_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698