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

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

Issue 304793003: use enum to specify deviceSource for fling animation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed desired #include Created 6 years, 6 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_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 event->details().touch_points() == 1) { 1932 event->details().touch_points() == 1) {
1933 delegate->HandleGestureBegin(); 1933 delegate->HandleGestureBegin();
1934 } 1934 }
1935 1935
1936 blink::WebGestureEvent gesture = MakeWebGestureEvent(event); 1936 blink::WebGestureEvent gesture = MakeWebGestureEvent(event);
1937 if (event->type() == ui::ET_GESTURE_TAP_DOWN) { 1937 if (event->type() == ui::ET_GESTURE_TAP_DOWN) {
1938 // Webkit does not stop a fling-scroll on tap-down. So explicitly send an 1938 // Webkit does not stop a fling-scroll on tap-down. So explicitly send an
1939 // event to stop any in-progress flings. 1939 // event to stop any in-progress flings.
1940 blink::WebGestureEvent fling_cancel = gesture; 1940 blink::WebGestureEvent fling_cancel = gesture;
1941 fling_cancel.type = blink::WebInputEvent::GestureFlingCancel; 1941 fling_cancel.type = blink::WebInputEvent::GestureFlingCancel;
1942 fling_cancel.sourceDevice = blink::WebGestureEvent::Touchscreen; 1942 fling_cancel.sourceDevice = blink::WebGestureDeviceTouchpad;
1943 host_->ForwardGestureEvent(fling_cancel); 1943 host_->ForwardGestureEvent(fling_cancel);
1944 } 1944 }
1945 1945
1946 if (gesture.type != blink::WebInputEvent::Undefined) { 1946 if (gesture.type != blink::WebInputEvent::Undefined) {
1947 host_->ForwardGestureEventWithLatencyInfo(gesture, *event->latency()); 1947 host_->ForwardGestureEventWithLatencyInfo(gesture, *event->latency());
1948 1948
1949 if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN || 1949 if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN ||
1950 event->type() == ui::ET_GESTURE_SCROLL_UPDATE || 1950 event->type() == ui::ET_GESTURE_SCROLL_UPDATE ||
1951 event->type() == ui::ET_GESTURE_SCROLL_END) { 1951 event->type() == ui::ET_GESTURE_SCROLL_END) {
1952 RecordAction(base::UserMetricsAction("TouchscreenScroll")); 1952 RecordAction(base::UserMetricsAction("TouchscreenScroll"));
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 2379
2380 //////////////////////////////////////////////////////////////////////////////// 2380 ////////////////////////////////////////////////////////////////////////////////
2381 // RenderWidgetHostViewBase, public: 2381 // RenderWidgetHostViewBase, public:
2382 2382
2383 // static 2383 // static
2384 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2384 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2385 GetScreenInfoForWindow(results, NULL); 2385 GetScreenInfoForWindow(results, NULL);
2386 } 2386 }
2387 2387
2388 } // namespace content 2388 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698