Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Unified Diff: mojo/examples/aura_demo/window_tree_host_mojo.cc

Issue 218763002: Change AckEvent into request / response (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix early return Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/examples/aura_demo/window_tree_host_mojo.h ('k') | mojo/examples/compositor_app/compositor_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/aura_demo/window_tree_host_mojo.cc
diff --git a/mojo/examples/aura_demo/window_tree_host_mojo.cc b/mojo/examples/aura_demo/window_tree_host_mojo.cc
index 4e94938473663fe89843fa541d5a5f78301301c2..8f8329f6fe5c51bb1f09826b6cdffb969d215e94 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
« no previous file with comments | « mojo/examples/aura_demo/window_tree_host_mojo.h ('k') | mojo/examples/compositor_app/compositor_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698