| 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 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2758 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 2758 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 2759 } else { | 2759 } else { |
| 2760 webview()->setDeviceScaleFactor(device_scale_factor_); | 2760 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 2761 } | 2761 } |
| 2762 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 2762 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 2763 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 2763 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 2764 } | 2764 } |
| 2765 | 2765 |
| 2766 void RenderViewImpl::OnDiscardInputEvent( | 2766 void RenderViewImpl::OnDiscardInputEvent( |
| 2767 const blink::WebInputEvent* input_event, | 2767 const blink::WebInputEvent* input_event, |
| 2768 const std::vector<const blink::WebInputEvent*>& coalescedEvents, |
| 2768 const ui::LatencyInfo& latency_info, | 2769 const ui::LatencyInfo& latency_info, |
| 2769 InputEventDispatchType dispatch_type) { | 2770 InputEventDispatchType dispatch_type) { |
| 2770 if (!input_event || (dispatch_type != DISPATCH_TYPE_BLOCKING && | 2771 if (!input_event || (dispatch_type != DISPATCH_TYPE_BLOCKING && |
| 2771 dispatch_type != DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN)) { | 2772 dispatch_type != DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN)) { |
| 2772 return; | 2773 return; |
| 2773 } | 2774 } |
| 2774 | 2775 |
| 2775 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) { | 2776 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) { |
| 2776 NotifyInputEventHandled(input_event->type, | 2777 NotifyInputEventHandled(input_event->type, |
| 2777 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2778 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 2778 } | 2779 } |
| 2779 | 2780 |
| 2780 std::unique_ptr<InputEventAck> ack( | 2781 std::unique_ptr<InputEventAck> ack( |
| 2781 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, | 2782 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, |
| 2782 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2783 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
| 2783 OnInputEventAck(std::move(ack)); | 2784 OnInputEventAck(std::move(ack)); |
| 2784 } | 2785 } |
| 2785 | 2786 |
| 2786 } // namespace content | 2787 } // namespace content |
| OLD | NEW |