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

Unified Diff: components/mus/public/cpp/lib/window_tree_client_impl.cc

Issue 1891413002: mash: Convert OnWindowInputEventAck to use an enum for handled status (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed a file Created 4 years, 8 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 | « components/mus/public/cpp/input_event_handler.h ('k') | components/mus/public/cpp/tests/test_window_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/public/cpp/lib/window_tree_client_impl.cc
diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.cc b/components/mus/public/cpp/lib/window_tree_client_impl.cc
index 9b199da20cc8d1fb99f9ed7d151ce3152a046265..23cc50de852f8f286bb2f203dd2c3bc5f2442b9f 100644
--- a/components/mus/public/cpp/lib/window_tree_client_impl.cc
+++ b/components/mus/public/cpp/lib/window_tree_client_impl.cc
@@ -868,12 +868,12 @@ void WindowTreeClientImpl::OnWindowInputEvent(uint32_t event_id,
mojom::EventPtr event) {
Window* window = GetWindowByServerId(window_id);
if (!window || !window->input_event_handler_) {
- tree_->OnWindowInputEventAck(event_id, false);
+ tree_->OnWindowInputEventAck(event_id, mojom::EventResult::UNHANDLED);
return;
}
- scoped_ptr<base::Callback<void(bool)>> ack_callback(
- new base::Callback<void(bool)>(
+ scoped_ptr<base::Callback<void(mojom::EventResult)>> ack_callback(
+ new base::Callback<void(mojom::EventResult)>(
base::Bind(&mojom::WindowTree::OnWindowInputEventAck,
base::Unretained(tree_), event_id)));
window->input_event_handler_->OnWindowInputEvent(
@@ -882,7 +882,7 @@ void WindowTreeClientImpl::OnWindowInputEvent(uint32_t event_id,
// The handler did not take ownership of the callback, so we send the ack,
// marking the event as not consumed.
if (ack_callback)
- ack_callback->Run(false);
+ ack_callback->Run(mojom::EventResult::UNHANDLED);
}
void WindowTreeClientImpl::OnWindowFocused(Id focused_window_id) {
« no previous file with comments | « components/mus/public/cpp/input_event_handler.h ('k') | components/mus/public/cpp/tests/test_window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698