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

Unified Diff: mojo/examples/view_manager/view_manager.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/sample_app/sample_app.cc ('k') | mojo/services/native_viewport/native_viewport.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/view_manager/view_manager.cc
diff --git a/mojo/examples/view_manager/view_manager.cc b/mojo/examples/view_manager/view_manager.cc
index 7560f9359b4d1f03850f69d03e9c11b5ec40e73a..4dd2872fce8744428187c727b9cc050b038664f1 100644
--- a/mojo/examples/view_manager/view_manager.cc
+++ b/mojo/examples/view_manager/view_manager.cc
@@ -82,9 +82,8 @@ class ViewManagerImpl : public Service<ViewManager, ViewManagerImpl>,
virtual void OnBoundsChanged(const Rect& bounds) OVERRIDE {
// TODO(beng):
}
- virtual void OnEvent(const Event& event) OVERRIDE {
- if (!event.location().is_null())
- native_viewport_->AckEvent(event);
+ virtual void OnEvent(const Event& event,
+ const mojo::Callback<void()>& callback) OVERRIDE {
if (event.action() == ui::ET_KEY_RELEASED) {
if (event.key_data().key_code() == ui::VKEY_L &&
(event.flags() & ui::EF_CONTROL_DOWN)) {
@@ -92,6 +91,7 @@ class ViewManagerImpl : public Service<ViewManager, ViewManagerImpl>,
launcher_->Show();
}
}
+ callback.Run();
}
// Overridden from LauncherClient:
« no previous file with comments | « mojo/examples/sample_app/sample_app.cc ('k') | mojo/services/native_viewport/native_viewport.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698