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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |