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