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

Side by Side Diff: content/renderer/mus/render_widget_mus_connection.cc

Issue 2094323002: Ensure acks are sent for all blocking events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/mus/render_widget_mus_connection.h" 5 #include "content/renderer/mus/render_widget_mus_connection.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 std::unique_ptr<InputEventAck> input_event_ack) { 113 std::unique_ptr<InputEventAck> input_event_ack) {
114 DCHECK(!pending_ack_.is_null()); 114 DCHECK(!pending_ack_.is_null());
115 pending_ack_.Run(input_event_ack->state == 115 pending_ack_.Run(input_event_ack->state ==
116 InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED 116 InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED
117 ? mus::mojom::EventResult::HANDLED 117 ? mus::mojom::EventResult::HANDLED
118 : mus::mojom::EventResult::UNHANDLED); 118 : mus::mojom::EventResult::UNHANDLED);
119 pending_ack_.Reset(); 119 pending_ack_.Reset();
120 } 120 }
121 121
122 void RenderWidgetMusConnection::NotifyInputEventHandled( 122 void RenderWidgetMusConnection::NotifyInputEventHandled(
123 blink::WebInputEvent::Type handled_type) { 123 blink::WebInputEvent::Type handled_type,
124 InputEventAckState ack_result) {
124 NOTIMPLEMENTED(); 125 NOTIMPLEMENTED();
125 } 126 }
126 127
127 void RenderWidgetMusConnection::SetInputHandler( 128 void RenderWidgetMusConnection::SetInputHandler(
128 RenderWidgetInputHandler* input_handler) { 129 RenderWidgetInputHandler* input_handler) {
129 DCHECK(!input_handler_); 130 DCHECK(!input_handler_);
130 input_handler_ = input_handler; 131 input_handler_ = input_handler;
131 } 132 }
132 133
133 void RenderWidgetMusConnection::UpdateTextInputState( 134 void RenderWidgetMusConnection::UpdateTextInputState(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // previous event. 171 // previous event.
171 // DCHECK(pending_ack_.is_null()); 172 // DCHECK(pending_ack_.is_null());
172 pending_ack_ = ack; 173 pending_ack_ = ack;
173 // TODO(fsamuel, sadrul): Track real latency info. 174 // TODO(fsamuel, sadrul): Track real latency info.
174 ui::LatencyInfo latency_info; 175 ui::LatencyInfo latency_info;
175 input_handler_->HandleInputEvent(*input_event, latency_info, 176 input_handler_->HandleInputEvent(*input_event, latency_info,
176 DISPATCH_TYPE_BLOCKING); 177 DISPATCH_TYPE_BLOCKING);
177 } 178 }
178 179
179 } // namespace content 180 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698