summaryrefslogtreecommitdiffstats
path: root/views/events
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-01 02:57:32 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-01 02:57:32 +0000
commite0dfebf8d0b7d9d902f16a92d6ab7b6f1140ca99 (patch)
treed71b7f80665b5afc8fd1d4b82db6143a61f913d8 /views/events
parent16cd877ed6fc2b62c05eb51ba8071dc169834439 (diff)
downloadchromium_src-e0dfebf8d0b7d9d902f16a92d6ab7b6f1140ca99.zip
chromium_src-e0dfebf8d0b7d9d902f16a92d6ab7b6f1140ca99.tar.gz
chromium_src-e0dfebf8d0b7d9d902f16a92d6ab7b6f1140ca99.tar.bz2
Wire MouseEvents through to the NativeWidgetAura.
http://crbug.com/93933 TEST=none Review URL: http://codereview.chromium.org/7812014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99108 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/events')
-rw-r--r--views/events/event_aura.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/views/events/event_aura.cc b/views/events/event_aura.cc
index 0a5a882..88ebe5b 100644
--- a/views/events/event_aura.cc
+++ b/views/events/event_aura.cc
@@ -4,6 +4,7 @@
#include "views/events/event.h"
+#include "aura/event.h"
#include "base/logging.h"
namespace views {
@@ -16,13 +17,11 @@ int GetKeyStateFlags() {
}
ui::EventType EventTypeFromNative(NativeEvent native_event) {
- NOTIMPLEMENTED();
- return ui::ET_UNKNOWN;
+ return native_event->type();
}
int EventFlagsFromNative(NativeEvent native_event) {
- NOTIMPLEMENTED();
- return 0;
+ return native_event->flags();
}
}
@@ -51,9 +50,8 @@ void Event::InitWithNativeEvent2(NativeEvent2 native_event_2,
// LocatedEvent, protected:
LocatedEvent::LocatedEvent(NativeEvent native_event)
- : Event(native_event, EventTypeFromNative(native_event),
- EventFlagsFromNative(native_event)),
- location_(0, 0 /* TODO(beng): obtain */) {
+ : Event(native_event, native_event->type(), native_event->flags()),
+ location_(static_cast<aura::LocatedEvent*>(native_event)->location()) {
}
LocatedEvent::LocatedEvent(NativeEvent2 native_event_2,
@@ -68,9 +66,7 @@ LocatedEvent::LocatedEvent(NativeEvent2 native_event_2,
// KeyEvent, public:
KeyEvent::KeyEvent(NativeEvent native_event)
- : Event(native_event,
- EventTypeFromNative(native_event),
- GetKeyStateFlags()),
+ : Event(native_event, native_event->type(), GetKeyStateFlags()),
key_code_(ui::VKEY_UNKNOWN /* TODO: obtain */),
character_(0),
unmodified_character_(0) {