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

Side by Side Diff: content/renderer/render_widget.cc

Issue 2094323002: Ensure acks are sent for all blocking events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 void RenderWidget::OnDidOverscroll(const DidOverscrollParams& params) { 860 void RenderWidget::OnDidOverscroll(const DidOverscrollParams& params) {
861 Send(new InputHostMsg_DidOverscroll(routing_id_, params)); 861 Send(new InputHostMsg_DidOverscroll(routing_id_, params));
862 } 862 }
863 863
864 void RenderWidget::OnInputEventAck( 864 void RenderWidget::OnInputEventAck(
865 std::unique_ptr<InputEventAck> input_event_ack) { 865 std::unique_ptr<InputEventAck> input_event_ack) {
866 Send(new InputHostMsg_HandleInputEvent_ACK(routing_id_, *input_event_ack)); 866 Send(new InputHostMsg_HandleInputEvent_ACK(routing_id_, *input_event_ack));
867 } 867 }
868 868
869 void RenderWidget::NotifyInputEventHandled( 869 void RenderWidget::NotifyInputEventHandled(
870 blink::WebInputEvent::Type handled_type) { 870 blink::WebInputEvent::Type handled_type,
871 InputEventAckState ack_result) {
871 RenderThreadImpl* render_thread = RenderThreadImpl::current(); 872 RenderThreadImpl* render_thread = RenderThreadImpl::current();
872 InputHandlerManager* input_handler_manager = 873 InputHandlerManager* input_handler_manager =
873 render_thread ? render_thread->input_handler_manager() : NULL; 874 render_thread ? render_thread->input_handler_manager() : NULL;
874 if (input_handler_manager) { 875 if (input_handler_manager) {
875 input_handler_manager->NotifyInputEventHandledOnMainThread(routing_id_, 876 input_handler_manager->NotifyInputEventHandledOnMainThread(
876 handled_type); 877 routing_id_, handled_type, ack_result);
877 } 878 }
878 } 879 }
879 880
880 void RenderWidget::SetInputHandler(RenderWidgetInputHandler* input_handler) { 881 void RenderWidget::SetInputHandler(RenderWidgetInputHandler* input_handler) {
881 // Nothing to do here. RenderWidget created the |input_handler| and will take 882 // Nothing to do here. RenderWidget created the |input_handler| and will take
882 // ownership of it. We just verify here that we don't already have an input 883 // ownership of it. We just verify here that we don't already have an input
883 // handler. 884 // handler.
884 DCHECK(!input_handler_); 885 DCHECK(!input_handler_);
885 } 886 }
886 887
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1978 void RenderWidget::requestPointerUnlock() { 1979 void RenderWidget::requestPointerUnlock() {
1979 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); 1980 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get());
1980 } 1981 }
1981 1982
1982 bool RenderWidget::isPointerLocked() { 1983 bool RenderWidget::isPointerLocked() {
1983 return mouse_lock_dispatcher_->IsMouseLockedTo( 1984 return mouse_lock_dispatcher_->IsMouseLockedTo(
1984 webwidget_mouse_lock_target_.get()); 1985 webwidget_mouse_lock_target_.get());
1985 } 1986 }
1986 1987
1987 } // namespace content 1988 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698