Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2479123003: WIP Add getCoalescedEvents API using vector of WebInputEvents (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698