| Index: ui/events/event.cc
|
| diff --git a/ui/events/event.cc b/ui/events/event.cc
|
| index 27de2a96b6a150891a4632df87890562f06a4eb0..13619d04569243039ce5a95cf81e8027f6748737 100644
|
| --- a/ui/events/event.cc
|
| +++ b/ui/events/event.cc
|
| @@ -236,6 +236,10 @@ CancelModeEvent::CancelModeEvent()
|
| CancelModeEvent::~CancelModeEvent() {
|
| }
|
|
|
| +scoped_ptr<Event> CancelModeEvent::Clone() const {
|
| + return scoped_ptr<Event>(new CancelModeEvent(*this));
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // LocatedEvent
|
|
|
| @@ -269,6 +273,10 @@ void LocatedEvent::UpdateForRootTransform(
|
| root_location_ = location_;
|
| }
|
|
|
| +scoped_ptr<Event> LocatedEvent::Clone() const {
|
| + return scoped_ptr<Event>(new LocatedEvent(*this));
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // MouseEvent
|
|
|
| @@ -405,6 +413,10 @@ void MouseEvent::SetClickCount(int click_count) {
|
| set_flags(f);
|
| }
|
|
|
| +scoped_ptr<Event> MouseEvent::Clone() const {
|
| + return scoped_ptr<Event>(new MouseEvent(*this));
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // MouseWheelEvent
|
|
|
| @@ -463,6 +475,10 @@ void MouseWheelEvent::UpdateForRootTransform(
|
| offset_.set_y(offset_.y() * decomp.scale[1]);
|
| }
|
|
|
| +scoped_ptr<Event> MouseWheelEvent::Clone() const {
|
| + return scoped_ptr<Event>(new MouseWheelEvent(*this));
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // TouchEvent
|
|
|
| @@ -537,6 +553,10 @@ void TouchEvent::UpdateForRootTransform(
|
| radius_y_ *= decomp.scale[1];
|
| }
|
|
|
| +scoped_ptr<Event> TouchEvent::Clone() const {
|
| + return scoped_ptr<Event>(new TouchEvent(*this));
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // KeyEvent
|
|
|
| @@ -763,6 +783,10 @@ void KeyEvent::SetTranslated(bool translated) {
|
| }
|
| }
|
|
|
| +scoped_ptr<Event> KeyEvent::Clone() const {
|
| + return scoped_ptr<Event>(new KeyEvent(*this));
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // ScrollEvent
|
|
|
| @@ -811,6 +835,10 @@ void ScrollEvent::Scale(const float factor) {
|
| y_offset_ordinal_ *= factor;
|
| }
|
|
|
| +scoped_ptr<Event> ScrollEvent::Clone() const {
|
| + return scoped_ptr<Event>(new ScrollEvent(*this));
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // GestureEvent
|
|
|
| @@ -830,4 +858,8 @@ GestureEvent::GestureEvent(float x,
|
| GestureEvent::~GestureEvent() {
|
| }
|
|
|
| +scoped_ptr<Event> GestureEvent::Clone() const {
|
| + return scoped_ptr<Event>(new GestureEvent(*this));
|
| +}
|
| +
|
| } // namespace ui
|
|
|