OLD | NEW |
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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 .data.flingStart.velocityY != 0.0); | 420 .data.flingStart.velocityY != 0.0); |
421 | 421 |
422 // This conversion is temporary. WebInputEvent should be generated | 422 // This conversion is temporary. WebInputEvent should be generated |
423 // directly from ui::Event with the viewport coordinates. See | 423 // directly from ui::Event with the viewport coordinates. See |
424 // crbug.com/563730. | 424 // crbug.com/563730. |
425 std::unique_ptr<blink::WebInputEvent> event_in_viewport = | 425 std::unique_ptr<blink::WebInputEvent> event_in_viewport = |
426 ui::ScaleWebInputEvent(input_event, device_scale_factor_); | 426 ui::ScaleWebInputEvent(input_event, device_scale_factor_); |
427 const WebInputEvent* event_to_send = | 427 const WebInputEvent* event_to_send = |
428 event_in_viewport ? event_in_viewport.get() : &input_event; | 428 event_in_viewport ? event_in_viewport.get() : &input_event; |
429 | 429 |
430 if (Send(new InputMsg_HandleInputEvent(routing_id(), event_to_send, | 430 if (Send(new InputMsg_HandleInputEvent( |
431 latency_info, dispatch_type))) { | 431 routing_id(), event_to_send, std::vector<IPC::WebInputEventPointer>(), |
| 432 latency_info, dispatch_type))) { |
432 // Ack messages for ignored ack event types should never be sent by the | 433 // Ack messages for ignored ack event types should never be sent by the |
433 // renderer. Consequently, such event types should not affect event time | 434 // renderer. Consequently, such event types should not affect event time |
434 // or in-flight event count metrics. | 435 // or in-flight event count metrics. |
435 if (dispatch_type == InputEventDispatchType::DISPATCH_TYPE_BLOCKING) | 436 if (dispatch_type == InputEventDispatchType::DISPATCH_TYPE_BLOCKING) |
436 client_->IncrementInFlightEventCount(input_event.type); | 437 client_->IncrementInFlightEventCount(input_event.type); |
437 return true; | 438 return true; |
438 } | 439 } |
439 return false; | 440 return false; |
440 } | 441 } |
441 | 442 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 | 630 |
630 flush_requested_ = false; | 631 flush_requested_ = false; |
631 client_->DidFlush(); | 632 client_->DidFlush(); |
632 } | 633 } |
633 | 634 |
634 void InputRouterImpl::SetFrameTreeNodeId(int frameTreeNodeId) { | 635 void InputRouterImpl::SetFrameTreeNodeId(int frameTreeNodeId) { |
635 frame_tree_node_id_ = frameTreeNodeId; | 636 frame_tree_node_id_ = frameTreeNodeId; |
636 } | 637 } |
637 | 638 |
638 } // namespace content | 639 } // namespace content |
OLD | NEW |