Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_impl.cc |
| diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc |
| index 5e57094a1ac9f7a891f91b77b7cf643fce0768ed..5524c051001addafc6e44d8ca50c56a803375382 100644 |
| --- a/content/browser/renderer_host/render_widget_host_impl.cc |
| +++ b/content/browser/renderer_host/render_widget_host_impl.cc |
| @@ -1181,6 +1181,12 @@ void RenderWidgetHostImpl::ForwardTouchEventWithLatencyInfo( |
| void RenderWidgetHostImpl::ForwardKeyboardEvent( |
| const NativeWebKeyboardEvent& key_event) { |
| + ForwardKeyboardEventWithCommands(key_event, nullptr); |
| +} |
| + |
| +void RenderWidgetHostImpl::ForwardKeyboardEventWithCommands( |
| + const NativeWebKeyboardEvent& key_event, |
| + const std::vector<EditCommand>* commands) { |
| TRACE_EVENT0("input", "RenderWidgetHostImpl::ForwardKeyboardEvent"); |
| if (owner_delegate_ && |
| !owner_delegate_->MayRenderWidgetForwardKeyboardEvent(key_event)) { |
| @@ -1247,6 +1253,10 @@ void RenderWidgetHostImpl::ForwardKeyboardEvent( |
| latency_info); |
| key_event_with_latency.event.isBrowserShortcut = is_shortcut; |
| DispatchInputEventWithLatencyInfo(key_event, &key_event_with_latency.latency); |
| + if (commands && !commands->empty()) { |
| + Send( |
| + new InputMsg_SetEditCommandsForNextKeyEvent(GetRoutingID(), *commands)); |
| + } |
| input_router_->SendKeyboardEvent(key_event_with_latency); |
|
sadrul
2017/01/20 18:20:15
InputRouter can do additional queueing/filtering.
foolip
2017/01/20 20:01:40
At which point in InputRouterImpl will it be undou
sadrul
2017/01/20 21:57:22
InputRouterImpl::OfferToRendere [1] I believe is w
foolip
2017/01/20 22:33:12
I can believe that, even passing it alongside the
|
| } |