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

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

Issue 2621303004: Keep track of coalesced events in main thread event queue (Closed)
Patch Set: Keep coalesced events in main thread event queue unittests Created 3 years, 11 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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 788
789 void RenderWidget::OnRequestMoveAck() { 789 void RenderWidget::OnRequestMoveAck() {
790 DCHECK(pending_window_rect_count_); 790 DCHECK(pending_window_rect_count_);
791 pending_window_rect_count_--; 791 pending_window_rect_count_--;
792 } 792 }
793 793
794 GURL RenderWidget::GetURLForGraphicsContext3D() { 794 GURL RenderWidget::GetURLForGraphicsContext3D() {
795 return GURL(); 795 return GURL();
796 } 796 }
797 797
798 void RenderWidget::OnHandleInputEvent(const blink::WebInputEvent* input_event, 798 void RenderWidget::OnHandleInputEvent(
799 const ui::LatencyInfo& latency_info, 799 const blink::WebInputEvent* input_event,
800 InputEventDispatchType dispatch_type) { 800 const std::vector<const blink::WebInputEvent*>& coalescedEvents,
801 const ui::LatencyInfo& latency_info,
802 InputEventDispatchType dispatch_type) {
801 if (!input_event) 803 if (!input_event)
802 return; 804 return;
803 input_handler_->HandleInputEvent(*input_event, latency_info, dispatch_type); 805
806 input_handler_->HandleInputEvent(
807 blink::WebCoalescedInputEvent(*input_event, coalescedEvents),
808 latency_info, dispatch_type);
804 } 809 }
805 810
806 void RenderWidget::OnCursorVisibilityChange(bool is_visible) { 811 void RenderWidget::OnCursorVisibilityChange(bool is_visible) {
807 if (GetWebWidget()) 812 if (GetWebWidget())
808 GetWebWidget()->setCursorVisibilityState(is_visible); 813 GetWebWidget()->setCursorVisibilityState(is_visible);
809 } 814 }
810 815
811 void RenderWidget::OnMouseCaptureLost() { 816 void RenderWidget::OnMouseCaptureLost() {
812 if (GetWebWidget()) 817 if (GetWebWidget())
813 GetWebWidget()->mouseCaptureLost(); 818 GetWebWidget()->mouseCaptureLost();
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 // browser side (https://crbug.com/669219). 2279 // browser side (https://crbug.com/669219).
2275 // If there is no WebFrameWidget, then there will be no 2280 // If there is no WebFrameWidget, then there will be no
2276 // InputMethodControllers for a WebLocalFrame. 2281 // InputMethodControllers for a WebLocalFrame.
2277 return nullptr; 2282 return nullptr;
2278 } 2283 }
2279 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) 2284 return static_cast<blink::WebFrameWidget*>(GetWebWidget())
2280 ->getActiveWebInputMethodController(); 2285 ->getActiveWebInputMethodController();
2281 } 2286 }
2282 2287
2283 } // namespace content 2288 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698