OLD | NEW |
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 } | 123 } |
124 | 124 |
125 void RenderWidgetMusConnection::OnInputEventAck( | 125 void RenderWidgetMusConnection::OnInputEventAck( |
126 scoped_ptr<InputEventAck> input_event_ack) { | 126 scoped_ptr<InputEventAck> input_event_ack) { |
127 DCHECK(!pending_ack_.is_null()); | 127 DCHECK(!pending_ack_.is_null()); |
128 pending_ack_.Run(input_event_ack->state == | 128 pending_ack_.Run(input_event_ack->state == |
129 InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED); | 129 InputEventAckState::INPUT_EVENT_ACK_STATE_CONSUMED); |
130 pending_ack_.Reset(); | 130 pending_ack_.Reset(); |
131 } | 131 } |
132 | 132 |
133 void RenderWidgetMusConnection::NonBlockingInputEventHandled( | 133 void RenderWidgetMusConnection::NotifyInputEventHandled( |
134 blink::WebInputEvent::Type handled_type) { | 134 blink::WebInputEvent::Type handled_type) { |
135 NOTIMPLEMENTED(); | 135 NOTIMPLEMENTED(); |
136 } | 136 } |
137 | 137 |
138 void RenderWidgetMusConnection::SetInputHandler( | 138 void RenderWidgetMusConnection::SetInputHandler( |
139 RenderWidgetInputHandler* input_handler) { | 139 RenderWidgetInputHandler* input_handler) { |
140 DCHECK(!input_handler_); | 140 DCHECK(!input_handler_); |
141 input_handler_ = input_handler; | 141 input_handler_ = input_handler; |
142 } | 142 } |
143 | 143 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 return; | 177 return; |
178 } | 178 } |
179 // TODO(fsamuel): It would be nice to add this DCHECK but the reality is an | 179 // TODO(fsamuel): It would be nice to add this DCHECK but the reality is an |
180 // event could timeout and we could receive the next event before we ack the | 180 // event could timeout and we could receive the next event before we ack the |
181 // previous event. | 181 // previous event. |
182 // DCHECK(pending_ack_.is_null()); | 182 // DCHECK(pending_ack_.is_null()); |
183 pending_ack_ = ack; | 183 pending_ack_ = ack; |
184 // TODO(fsamuel, sadrul): Track real latency info. | 184 // TODO(fsamuel, sadrul): Track real latency info. |
185 ui::LatencyInfo latency_info; | 185 ui::LatencyInfo latency_info; |
186 input_handler_->HandleInputEvent(*input_event, latency_info, | 186 input_handler_->HandleInputEvent(*input_event, latency_info, |
187 DISPATCH_TYPE_NORMAL); | 187 DISPATCH_TYPE_BLOCKING); |
188 } | 188 } |
189 | 189 |
190 } // namespace content | 190 } // namespace content |
OLD | NEW |