| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 } | 116 } |
| 117 | 117 |
| 118 void RenderWidgetMusConnection::OnInputEventAck( | 118 void RenderWidgetMusConnection::OnInputEventAck( |
| 119 scoped_ptr<InputEventAck> input_event_ack) { | 119 scoped_ptr<InputEventAck> input_event_ack) { |
| 120 DCHECK(!pending_ack_.is_null()); | 120 DCHECK(!pending_ack_.is_null()); |
| 121 // TODO(fsamuel): Use the state in |input_event_ack|. | 121 // TODO(fsamuel): Use the state in |input_event_ack|. |
| 122 pending_ack_.Run(); | 122 pending_ack_.Run(); |
| 123 pending_ack_.Reset(); | 123 pending_ack_.Reset(); |
| 124 } | 124 } |
| 125 | 125 |
| 126 void RenderWidgetMusConnection::NonBlockingInputEventHandled( |
| 127 blink::WebInputEvent::Type handled_type) { |
| 128 NOTIMPLEMENTED(); |
| 129 } |
| 130 |
| 126 void RenderWidgetMusConnection::SetInputHandler( | 131 void RenderWidgetMusConnection::SetInputHandler( |
| 127 RenderWidgetInputHandler* input_handler) { | 132 RenderWidgetInputHandler* input_handler) { |
| 128 DCHECK(!input_handler_); | 133 DCHECK(!input_handler_); |
| 129 input_handler_ = input_handler; | 134 input_handler_ = input_handler; |
| 130 } | 135 } |
| 131 | 136 |
| 132 void RenderWidgetMusConnection::UpdateTextInputState( | 137 void RenderWidgetMusConnection::UpdateTextInputState( |
| 133 ShowIme show_ime, | 138 ShowIme show_ime, |
| 134 ChangeSource change_source) { | 139 ChangeSource change_source) { |
| 135 NOTIMPLEMENTED(); | 140 NOTIMPLEMENTED(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 164 ack.Run(); | 169 ack.Run(); |
| 165 return; | 170 return; |
| 166 } | 171 } |
| 167 // TODO(fsamuel): It would be nice to add this DCHECK but the reality is an | 172 // TODO(fsamuel): It would be nice to add this DCHECK but the reality is an |
| 168 // event could timeout and we could receive the next event before we ack the | 173 // event could timeout and we could receive the next event before we ack the |
| 169 // previous event. | 174 // previous event. |
| 170 // DCHECK(pending_ack_.is_null()); | 175 // DCHECK(pending_ack_.is_null()); |
| 171 pending_ack_ = ack; | 176 pending_ack_ = ack; |
| 172 // TODO(fsamuel, sadrul): Track real latency info. | 177 // TODO(fsamuel, sadrul): Track real latency info. |
| 173 ui::LatencyInfo latency_info; | 178 ui::LatencyInfo latency_info; |
| 174 input_handler_->HandleInputEvent(*input_event, latency_info); | 179 input_handler_->HandleInputEvent(*input_event, latency_info, |
| 180 DISPATCH_TYPE_NORMAL); |
| 175 } | 181 } |
| 176 | 182 |
| 177 } // namespace content | 183 } // namespace content |
| OLD | NEW |