| 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 3013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3024 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3024 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3025 } else { | 3025 } else { |
| 3026 webview()->setDeviceScaleFactor(device_scale_factor_); | 3026 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3027 } | 3027 } |
| 3028 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3028 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3029 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3029 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3030 } | 3030 } |
| 3031 | 3031 |
| 3032 void RenderViewImpl::OnDiscardInputEvent( | 3032 void RenderViewImpl::OnDiscardInputEvent( |
| 3033 const blink::WebInputEvent* input_event, | 3033 const blink::WebInputEvent* input_event, |
| 3034 const std::vector<const blink::WebInputEvent*>& coalescedEvents, |
| 3034 const ui::LatencyInfo& latency_info, | 3035 const ui::LatencyInfo& latency_info, |
| 3035 InputEventDispatchType dispatch_type) { | 3036 InputEventDispatchType dispatch_type) { |
| 3036 if (!input_event || (dispatch_type != DISPATCH_TYPE_BLOCKING && | 3037 if (!input_event || (dispatch_type != DISPATCH_TYPE_BLOCKING && |
| 3037 dispatch_type != DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN)) { | 3038 dispatch_type != DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN)) { |
| 3038 return; | 3039 return; |
| 3039 } | 3040 } |
| 3040 | 3041 |
| 3041 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) { | 3042 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) { |
| 3042 NotifyInputEventHandled(input_event->type, | 3043 NotifyInputEventHandled(input_event->type, |
| 3043 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 3044 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 3044 } | 3045 } |
| 3045 | 3046 |
| 3046 std::unique_ptr<InputEventAck> ack( | 3047 std::unique_ptr<InputEventAck> ack( |
| 3047 new InputEventAck(input_event->type, INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 3048 new InputEventAck(input_event->type, INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
| 3048 OnInputEventAck(std::move(ack)); | 3049 OnInputEventAck(std::move(ack)); |
| 3049 } | 3050 } |
| 3050 | 3051 |
| 3051 } // namespace content | 3052 } // namespace content |
| OLD | NEW |