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

Side by Side Diff: content/browser/renderer_host/input/input_router_impl.cc

Issue 2621303004: Keep track of coalesced events in main thread event queue (Closed)
Patch Set: Rebase 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/renderer_host/input/input_router_impl.h" 5 #include "content/browser/renderer_host/input/input_router_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 .data.flingStart.velocityY != 0.0); 421 .data.flingStart.velocityY != 0.0);
422 422
423 // This conversion is temporary. WebInputEvent should be generated 423 // This conversion is temporary. WebInputEvent should be generated
424 // directly from ui::Event with the viewport coordinates. See 424 // directly from ui::Event with the viewport coordinates. See
425 // crbug.com/563730. 425 // crbug.com/563730.
426 std::unique_ptr<blink::WebInputEvent> event_in_viewport = 426 std::unique_ptr<blink::WebInputEvent> event_in_viewport =
427 ui::ScaleWebInputEvent(input_event, device_scale_factor_); 427 ui::ScaleWebInputEvent(input_event, device_scale_factor_);
428 const WebInputEvent* event_to_send = 428 const WebInputEvent* event_to_send =
429 event_in_viewport ? event_in_viewport.get() : &input_event; 429 event_in_viewport ? event_in_viewport.get() : &input_event;
430 430
431 if (Send(new InputMsg_HandleInputEvent(routing_id(), event_to_send, 431 if (Send(new InputMsg_HandleInputEvent(
432 latency_info, dispatch_type))) { 432 routing_id(), event_to_send, std::vector<IPC::WebInputEventPointer>(),
433 latency_info, dispatch_type))) {
433 // Ack messages for ignored ack event types should never be sent by the 434 // Ack messages for ignored ack event types should never be sent by the
434 // renderer. Consequently, such event types should not affect event time 435 // renderer. Consequently, such event types should not affect event time
435 // or in-flight event count metrics. 436 // or in-flight event count metrics.
436 if (dispatch_type == InputEventDispatchType::DISPATCH_TYPE_BLOCKING) 437 if (dispatch_type == InputEventDispatchType::DISPATCH_TYPE_BLOCKING)
437 client_->IncrementInFlightEventCount(input_event.type()); 438 client_->IncrementInFlightEventCount(input_event.type());
438 return true; 439 return true;
439 } 440 }
440 return false; 441 return false;
441 } 442 }
442 443
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 631
631 flush_requested_ = false; 632 flush_requested_ = false;
632 client_->DidFlush(); 633 client_->DidFlush();
633 } 634 }
634 635
635 void InputRouterImpl::SetFrameTreeNodeId(int frameTreeNodeId) { 636 void InputRouterImpl::SetFrameTreeNodeId(int frameTreeNodeId) {
636 frame_tree_node_id_ = frameTreeNodeId; 637 frame_tree_node_id_ = frameTreeNodeId;
637 } 638 }
638 639
639 } // namespace content 640 } // namespace content
OLDNEW
« no previous file with comments | « components/test_runner/text_input_controller.cc ('k') | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698