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

Unified Diff: views/events/event.cc

Issue 6591120: Update MouseEvent (initial pass). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 9 years, 9 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 | « views/events/event.h ('k') | views/events/event_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/events/event.cc
diff --git a/views/events/event.cc b/views/events/event.cc
index 4b74dbe37869754841e7dd3d32af61cab1a274b5..de8a1ba92b2f9867dd86289ff284a7fff1da4c47 100644
--- a/views/events/event.cc
+++ b/views/events/event.cc
@@ -38,6 +38,7 @@ Event::Event(NativeEvent2 native_event_2, ui::EventType type, int flags,
////////////////////////////////////////////////////////////////////////////////
// LocatedEvent, protected:
+// TODO(msw): Kill this legacy constructor when we update uses.
LocatedEvent::LocatedEvent(ui::EventType type, const gfx::Point& location,
int flags)
: Event(type, flags),
@@ -52,9 +53,6 @@ LocatedEvent::LocatedEvent(const LocatedEvent& model, View* source,
View::ConvertPointToView(source, target, &location_);
}
-////////////////////////////////////////////////////////////////////////////////
-// LocatedEvent, private:
-
LocatedEvent::LocatedEvent(const LocatedEvent& model, RootView* root)
: Event(model),
location_(model.location_) {
@@ -73,16 +71,17 @@ KeyEvent::KeyEvent(ui::EventType type, ui::KeyboardCode key_code,
////////////////////////////////////////////////////////////////////////////////
// MouseEvent, public:
+// TODO(msw): Kill this legacy constructor when we update uses.
MouseEvent::MouseEvent(ui::EventType type,
- View* from,
- View* to,
+ View* source,
+ View* target,
const gfx::Point &l,
int flags)
- : LocatedEvent(MouseEvent(type, l.x(), l.y(), flags), from, to) {
+ : LocatedEvent(MouseEvent(type, l.x(), l.y(), flags), source, target) {
}
-MouseEvent::MouseEvent(const MouseEvent& model, View* from, View* to)
- : LocatedEvent(model, from, to) {
+MouseEvent::MouseEvent(const MouseEvent& model, View* source, View* target)
+ : LocatedEvent(model, source, target) {
}
////////////////////////////////////////////////////////////////////////////////
@@ -97,17 +96,18 @@ TouchEvent::TouchEvent(ui::EventType type, int x, int y, int flags,
TouchEvent::TouchEvent(ui::EventType type,
- View* from,
- View* to,
+ View* source,
+ View* target,
const gfx::Point& l,
int flags,
int touch_id)
- : LocatedEvent(TouchEvent(type, l.x(), l.y(), flags, touch_id), from, to),
+ : LocatedEvent(TouchEvent(type, l.x(), l.y(), flags, touch_id), source,
+ target),
touch_id_(touch_id) {
}
-TouchEvent::TouchEvent(const TouchEvent& model, View* from, View* to)
- : LocatedEvent(model, from, to),
+TouchEvent::TouchEvent(const TouchEvent& model, View* source, View* target)
+ : LocatedEvent(model, source, target),
touch_id_(model.touch_id_) {
}
#endif
« no previous file with comments | « views/events/event.h ('k') | views/events/event_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698