| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "views/events/event.h" | 5 #include "views/events/event.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/aura/event.h" | 8 #include "ui/aura/event.h" |
| 9 | 9 |
| 10 namespace views { | 10 namespace views { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // KeyEvent, public: | 21 // KeyEvent, public: |
| 22 | 22 |
| 23 KeyEvent::KeyEvent(const NativeEvent& native_event) | 23 KeyEvent::KeyEvent(const NativeEvent& native_event) |
| 24 : Event(native_event, native_event->type(), native_event->flags()), | 24 : Event(native_event, native_event->type(), native_event->flags()), |
| 25 key_code_(static_cast<aura::KeyEvent*>(native_event)->key_code()), | 25 key_code_(static_cast<aura::KeyEvent*>(native_event)->key_code()), |
| 26 character_(0), | 26 character_(0), |
| 27 unmodified_character_(0) { | 27 unmodified_character_(0) { |
| 28 } | 28 } |
| 29 | 29 |
| 30 uint16 KeyEvent::GetCharacter() const { | 30 uint16 KeyEvent::GetCharacter() const { |
| 31 NOTIMPLEMENTED(); | 31 return character_; |
| 32 return key_code_; | |
| 33 } | 32 } |
| 34 | 33 |
| 35 uint16 KeyEvent::GetUnmodifiedCharacter() const { | 34 uint16 KeyEvent::GetUnmodifiedCharacter() const { |
| 36 NOTIMPLEMENTED(); | 35 return unmodified_character_; |
| 37 return key_code_; | |
| 38 } | 36 } |
| 39 | 37 |
| 40 //////////////////////////////////////////////////////////////////////////////// | 38 //////////////////////////////////////////////////////////////////////////////// |
| 41 // MouseWheelEvent, public: | 39 // MouseWheelEvent, public: |
| 42 | 40 |
| 43 MouseWheelEvent::MouseWheelEvent(const NativeEvent& native_event) | 41 MouseWheelEvent::MouseWheelEvent(const NativeEvent& native_event) |
| 44 : MouseEvent(native_event), | 42 : MouseEvent(native_event), |
| 45 offset_(0 /* TODO(beng): obtain */) { | 43 offset_(0 /* TODO(beng): obtain */) { |
| 46 } | 44 } |
| 47 | 45 |
| 48 } // namespace views | 46 } // namespace views |
| OLD | NEW |