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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 181723006: Handle mac trackpad zoom via GesturePinch events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jdduke CR feedback and fix win build errors Created 6 years, 9 months 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 | Annotate | Revision Log
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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after
2113 InputEventAckState ack_result) { 2113 InputEventAckState ack_result) {
2114 if (!event.latency.FindLatency( 2114 if (!event.latency.FindLatency(
2115 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, NULL)) { 2115 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, NULL)) {
2116 // GestureEvent latency ends when it is acked but does not cause any 2116 // GestureEvent latency ends when it is acked but does not cause any
2117 // rendering scheduled. 2117 // rendering scheduled.
2118 ui::LatencyInfo latency = event.latency; 2118 ui::LatencyInfo latency = event.latency;
2119 latency.AddLatencyNumber( 2119 latency.AddLatencyNumber(
2120 ui::INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, 0 ,0); 2120 ui::INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, 0 ,0);
2121 } 2121 }
2122 2122
2123 if (ack_result != INPUT_EVENT_ACK_STATE_CONSUMED) {
2124 if (delegate_->HandleGestureEvent(event.event))
2125 ack_result = INPUT_EVENT_ACK_STATE_CONSUMED;
2126 }
2127
2123 if (view_) 2128 if (view_)
2124 view_->GestureEventAck(event.event, ack_result); 2129 view_->GestureEventAck(event.event, ack_result);
2125 } 2130 }
2126 2131
2127 void RenderWidgetHostImpl::OnTouchEventAck( 2132 void RenderWidgetHostImpl::OnTouchEventAck(
2128 const TouchEventWithLatencyInfo& event, 2133 const TouchEventWithLatencyInfo& event,
2129 InputEventAckState ack_result) { 2134 InputEventAckState ack_result) {
2130 TouchEventWithLatencyInfo touch_event = event; 2135 TouchEventWithLatencyInfo touch_event = event;
2131 touch_event.latency.AddLatencyNumber( 2136 touch_event.latency.AddLatencyNumber(
2132 ui::INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT, 0, 0); 2137 ui::INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT, 0, 0);
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
2532 } 2537 }
2533 } 2538 }
2534 2539
2535 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { 2540 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() {
2536 if (view_) 2541 if (view_)
2537 return view_->PreferredReadbackFormat(); 2542 return view_->PreferredReadbackFormat();
2538 return SkBitmap::kARGB_8888_Config; 2543 return SkBitmap::kARGB_8888_Config;
2539 } 2544 }
2540 2545
2541 } // namespace content 2546 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698