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

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

Issue 10827271: Replace views::Event with ui::Event. (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 151055)
+++ ui/views/events/event.cc (working copy)
@@ -12,28 +12,10 @@
namespace views {
////////////////////////////////////////////////////////////////////////////////
-// Event, protected:
-
-Event::Event(ui::EventType type, int flags)
- : type_(type),
- time_stamp_(base::Time::NowFromSystemTime()),
- flags_(flags) {
- // Safely initialize the pointer/struct to null/empty.
- memset(&native_event_, 0, sizeof(native_event_));
-}
-
-Event::Event(const NativeEvent& native_event, ui::EventType type, int flags)
- : native_event_(native_event),
- type_(type),
- time_stamp_(base::Time::NowFromSystemTime()),
- flags_(flags) {
-}
-
-////////////////////////////////////////////////////////////////////////////////
// LocatedEvent, protected:
#if !defined(USE_AURA)
-LocatedEvent::LocatedEvent(const NativeEvent& native_event)
+LocatedEvent::LocatedEvent(const ui::NativeEvent& native_event)
: Event(native_event,
ui::EventTypeFromNative(native_event),
ui::EventFlagsFromNative(native_event)),
@@ -67,7 +49,7 @@
////////////////////////////////////////////////////////////////////////////////
// MouseEvent, public:
-MouseEvent::MouseEvent(const NativeEvent& native_event)
+MouseEvent::MouseEvent(const ui::NativeEvent& native_event)
: LocatedEvent(native_event) {
}
@@ -79,14 +61,14 @@
// MouseWheelEvent, public:
#if !defined(USE_AURA)
-MouseWheelEvent::MouseWheelEvent(const NativeEvent& native_event)
+MouseWheelEvent::MouseWheelEvent(const ui::NativeEvent& native_event)
: MouseEvent(native_event),
offset_(ui::GetMouseWheelOffset(native_event)) {
}
#endif
MouseWheelEvent::MouseWheelEvent(const ScrollEvent& scroll_event)
- : MouseEvent(scroll_event.native_event()),
+ : MouseEvent(scroll_event),
offset_(scroll_event.y_offset()) {
set_type(ui::ET_MOUSEWHEEL);
}
« 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