Index: ui/views/mus/platform_window_mus.cc |
diff --git a/ui/views/mus/platform_window_mus.cc b/ui/views/mus/platform_window_mus.cc |
index 2a1fc4e3ef4ea5b13f1d143c172bb050f19722cb..d42a9a779089a7a6ac0ee413b97206cec6d48b07 100644 |
--- a/ui/views/mus/platform_window_mus.cc |
+++ b/ui/views/mus/platform_window_mus.cc |
@@ -222,15 +222,16 @@ void PlatformWindowMus::OnRequestClose(mus::Window* window) { |
void PlatformWindowMus::OnWindowInputEvent( |
mus::Window* view, |
- mus::mojom::EventPtr event, |
+ const ui::Event& event, |
scoped_ptr<base::Callback<void(bool)>>* ack_callback) { |
// It's possible dispatching the event will spin a nested message loop. Ack |
// the callback now, otherwise we appear unresponsive for the life of the |
// nested message loop. |
(*ack_callback)->Run(true); |
ack_callback->reset(); |
- scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event>>()); |
- delegate_->DispatchEvent(ui_event.get()); |
+ // TODO(moshayedi): Avoid cloning after updating PlatformWindowDelegate to |
+ // accept constant pointers. |
+ delegate_->DispatchEvent(ui::Event::Clone(event).get()); |
} |
} // namespace views |