From bd600527b06a390fc8a1e87cb42e3dda967ff5bc Mon Sep 17 00:00:00 2001 From: "davemoore@chromium.org" Date: Mon, 31 Mar 2014 20:33:34 +0000 Subject: Change AckEvent into request / response BUG=None Review URL: https://codereview.chromium.org/218763002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260635 0039d316-1c4b-4281-b951-d872f2087c98 --- mojo/examples/aura_demo/window_tree_host_mojo.cc | 7 +++---- mojo/examples/aura_demo/window_tree_host_mojo.h | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'mojo/examples/aura_demo') diff --git a/mojo/examples/aura_demo/window_tree_host_mojo.cc b/mojo/examples/aura_demo/window_tree_host_mojo.cc index 4e94938..8f8329f 100644 --- a/mojo/examples/aura_demo/window_tree_host_mojo.cc +++ b/mojo/examples/aura_demo/window_tree_host_mojo.cc @@ -166,10 +166,8 @@ void WindowTreeHostMojo::OnDestroyed() { base::MessageLoop::current()->Quit(); } -void WindowTreeHostMojo::OnEvent(const Event& event) { - if (!event.location().is_null()) - native_viewport_->AckEvent(event); - +void WindowTreeHostMojo::OnEvent(const Event& event, + const mojo::Callback& callback) { switch (event.action()) { case ui::ET_MOUSE_PRESSED: case ui::ET_MOUSE_DRAGGED: @@ -194,6 +192,7 @@ void WindowTreeHostMojo::OnEvent(const Event& event) { } // TODO(beng): touch, etc. } + callback.Run(); }; } // namespace examples diff --git a/mojo/examples/aura_demo/window_tree_host_mojo.h b/mojo/examples/aura_demo/window_tree_host_mojo.h index 79dd9db3..58bdcbf 100644 --- a/mojo/examples/aura_demo/window_tree_host_mojo.h +++ b/mojo/examples/aura_demo/window_tree_host_mojo.h @@ -60,7 +60,8 @@ class WindowTreeHostMojo : public aura::WindowTreeHost, virtual void OnCreated() OVERRIDE; virtual void OnDestroyed() OVERRIDE; virtual void OnBoundsChanged(const Rect& bounds) OVERRIDE; - virtual void OnEvent(const Event& event) OVERRIDE; + virtual void OnEvent(const Event& event, + const mojo::Callback& callback) OVERRIDE; static ui::ContextFactory* context_factory_; -- cgit v1.1