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

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

Issue 2118273002: Ensure acks are sent for all blocking events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: 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
« no previous file with comments | « content/renderer/mus/render_widget_mus_connection.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 std::unique_ptr<InputEventAck> input_event_ack) { 127 std::unique_ptr<InputEventAck> input_event_ack) {
128 DCHECK(!pending_ack_.is_null()); 128 DCHECK(!pending_ack_.is_null());
129 pending_ack_.Run(input_event_ack->state == 129 pending_ack_.Run(input_event_ack->state ==
130 InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED 130 InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED
131 ? mus::mojom::EventResult::HANDLED 131 ? mus::mojom::EventResult::HANDLED
132 : mus::mojom::EventResult::UNHANDLED); 132 : mus::mojom::EventResult::UNHANDLED);
133 pending_ack_.Reset(); 133 pending_ack_.Reset();
134 } 134 }
135 135
136 void RenderWidgetMusConnection::NotifyInputEventHandled( 136 void RenderWidgetMusConnection::NotifyInputEventHandled(
137 blink::WebInputEvent::Type handled_type) { 137 blink::WebInputEvent::Type handled_type,
138 InputEventAckState ack_result) {
138 NOTIMPLEMENTED(); 139 NOTIMPLEMENTED();
139 } 140 }
140 141
141 void RenderWidgetMusConnection::SetInputHandler( 142 void RenderWidgetMusConnection::SetInputHandler(
142 RenderWidgetInputHandler* input_handler) { 143 RenderWidgetInputHandler* input_handler) {
143 DCHECK(!input_handler_); 144 DCHECK(!input_handler_);
144 input_handler_ = input_handler; 145 input_handler_ = input_handler;
145 } 146 }
146 147
147 void RenderWidgetMusConnection::UpdateTextInputState( 148 void RenderWidgetMusConnection::UpdateTextInputState(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // previous event. 185 // previous event.
185 // DCHECK(pending_ack_.is_null()); 186 // DCHECK(pending_ack_.is_null());
186 pending_ack_ = ack; 187 pending_ack_ = ack;
187 // TODO(fsamuel, sadrul): Track real latency info. 188 // TODO(fsamuel, sadrul): Track real latency info.
188 ui::LatencyInfo latency_info; 189 ui::LatencyInfo latency_info;
189 input_handler_->HandleInputEvent(*input_event, latency_info, 190 input_handler_->HandleInputEvent(*input_event, latency_info,
190 DISPATCH_TYPE_BLOCKING); 191 DISPATCH_TYPE_BLOCKING);
191 } 192 }
192 193
193 } // namespace content 194 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/mus/render_widget_mus_connection.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698