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

Unified Diff: content/renderer/mus/render_widget_mus_connection.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 | « content/renderer/mus/render_widget_mus_connection.h ('k') | ui/views/mus/platform_window_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/mus/render_widget_mus_connection.cc
diff --git a/content/renderer/mus/render_widget_mus_connection.cc b/content/renderer/mus/render_widget_mus_connection.cc
index 677775406ce94f26fad44474f9bb807d0cad407c..d1821e8bac0acd3a2cc2f58f24cd5d15ba45ce86 100644
--- a/content/renderer/mus/render_widget_mus_connection.cc
+++ b/content/renderer/mus/render_widget_mus_connection.cc
@@ -127,7 +127,9 @@ void RenderWidgetMusConnection::OnInputEventAck(
std::unique_ptr<InputEventAck> input_event_ack) {
DCHECK(!pending_ack_.is_null());
pending_ack_.Run(input_event_ack->state ==
- InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED);
+ InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED
+ ? mus::mojom::EventResult::HANDLED
+ : mus::mojom::EventResult::UNHANDLED);
pending_ack_.Reset();
}
@@ -169,12 +171,12 @@ void RenderWidgetMusConnection::OnConnectionLost() {
void RenderWidgetMusConnection::OnWindowInputEvent(
std::unique_ptr<blink::WebInputEvent> input_event,
- const base::Callback<void(bool)>& ack) {
+ const base::Callback<void(mus::mojom::EventResult)>& ack) {
DCHECK(thread_checker_.CalledOnValidThread());
// If we don't yet have a RenderWidgetInputHandler then we don't yet have
// an initialized RenderWidget.
if (!input_handler_) {
- ack.Run(false);
+ ack.Run(mus::mojom::EventResult::UNHANDLED);
return;
}
// TODO(fsamuel): It would be nice to add this DCHECK but the reality is an
« no previous file with comments | « content/renderer/mus/render_widget_mus_connection.h ('k') | ui/views/mus/platform_window_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698