| 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 2697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2708 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 2708 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 2709 } else { | 2709 } else { |
| 2710 webview()->setDeviceScaleFactor(device_scale_factor_); | 2710 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 2711 } | 2711 } |
| 2712 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 2712 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 2713 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 2713 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 2714 } | 2714 } |
| 2715 | 2715 |
| 2716 void RenderViewImpl::OnDiscardInputEvent( | 2716 void RenderViewImpl::OnDiscardInputEvent( |
| 2717 const blink::WebInputEvent* input_event, | 2717 const blink::WebInputEvent* input_event, |
| 2718 const std::vector<const blink::WebInputEvent*>& coalesced_events, |
| 2718 const ui::LatencyInfo& latency_info, | 2719 const ui::LatencyInfo& latency_info, |
| 2719 InputEventDispatchType dispatch_type) { | 2720 InputEventDispatchType dispatch_type) { |
| 2720 if (!input_event || (dispatch_type != DISPATCH_TYPE_BLOCKING && | 2721 if (!input_event || (dispatch_type != DISPATCH_TYPE_BLOCKING && |
| 2721 dispatch_type != DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN)) { | 2722 dispatch_type != DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN)) { |
| 2722 return; | 2723 return; |
| 2723 } | 2724 } |
| 2724 | 2725 |
| 2725 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) { | 2726 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) { |
| 2726 NotifyInputEventHandled(input_event->type(), | 2727 NotifyInputEventHandled(input_event->type(), |
| 2727 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2728 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 2728 } | 2729 } |
| 2729 | 2730 |
| 2730 std::unique_ptr<InputEventAck> ack( | 2731 std::unique_ptr<InputEventAck> ack( |
| 2731 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), | 2732 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), |
| 2732 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2733 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
| 2733 OnInputEventAck(std::move(ack)); | 2734 OnInputEventAck(std::move(ack)); |
| 2734 } | 2735 } |
| 2735 | 2736 |
| 2736 } // namespace content | 2737 } // namespace content |
| OLD | NEW |