summaryrefslogtreecommitdiffstats
path: root/mojo/examples/aura_demo
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-31 20:33:34 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-31 20:33:34 +0000
commitbd600527b06a390fc8a1e87cb42e3dda967ff5bc (patch)
treefcd2f9897b45e3409d4b0cd19fca5ac4257f6c83 /mojo/examples/aura_demo
parentf8f5914e45c17620afa11f257d03389b3af4d20f (diff)
downloadchromium_src-bd600527b06a390fc8a1e87cb42e3dda967ff5bc.zip
chromium_src-bd600527b06a390fc8a1e87cb42e3dda967ff5bc.tar.gz
chromium_src-bd600527b06a390fc8a1e87cb42e3dda967ff5bc.tar.bz2
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
Diffstat (limited to 'mojo/examples/aura_demo')
-rw-r--r--mojo/examples/aura_demo/window_tree_host_mojo.cc7
-rw-r--r--mojo/examples/aura_demo/window_tree_host_mojo.h3
2 files changed, 5 insertions, 5 deletions
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<void()>& 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<void()>& callback) OVERRIDE;
static ui::ContextFactory* context_factory_;