| OLD | NEW |
| 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_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 2703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2714 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 2714 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 2715 } else { | 2715 } else { |
| 2716 webview()->setDeviceScaleFactor(device_scale_factor_); | 2716 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 2717 } | 2717 } |
| 2718 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 2718 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 2719 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 2719 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 2720 } | 2720 } |
| 2721 | 2721 |
| 2722 void RenderViewImpl::OnDiscardInputEvent( | 2722 void RenderViewImpl::OnDiscardInputEvent( |
| 2723 const blink::WebInputEvent* input_event, | 2723 const blink::WebInputEvent* input_event, |
| 2724 const std::vector<const blink::WebInputEvent*>& coalescedEvents, |
| 2724 const ui::LatencyInfo& latency_info, | 2725 const ui::LatencyInfo& latency_info, |
| 2725 InputEventDispatchType dispatch_type) { | 2726 InputEventDispatchType dispatch_type) { |
| 2726 if (!input_event || (dispatch_type != DISPATCH_TYPE_BLOCKING && | 2727 if (!input_event || (dispatch_type != DISPATCH_TYPE_BLOCKING && |
| 2727 dispatch_type != DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN)) { | 2728 dispatch_type != DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN)) { |
| 2728 return; | 2729 return; |
| 2729 } | 2730 } |
| 2730 | 2731 |
| 2731 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) { | 2732 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) { |
| 2732 NotifyInputEventHandled(input_event->type(), | 2733 NotifyInputEventHandled(input_event->type(), |
| 2733 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2734 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 2734 } | 2735 } |
| 2735 | 2736 |
| 2736 std::unique_ptr<InputEventAck> ack( | 2737 std::unique_ptr<InputEventAck> ack( |
| 2737 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), | 2738 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), |
| 2738 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2739 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
| 2739 OnInputEventAck(std::move(ack)); | 2740 OnInputEventAck(std::move(ack)); |
| 2740 } | 2741 } |
| 2741 | 2742 |
| 2742 } // namespace content | 2743 } // namespace content |
| OLD | NEW |