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_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include <InputScope.h> | 7 #include <InputScope.h> |
8 #include <wtsapi32.h> | 8 #include <wtsapi32.h> |
9 #pragma comment(lib, "wtsapi32.lib") | 9 #pragma comment(lib, "wtsapi32.lib") |
10 | 10 |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 CHECK(RegisterTouchWindow(m_hWnd, TWF_WANTPALM)); | 929 CHECK(RegisterTouchWindow(m_hWnd, TWF_WANTPALM)); |
930 } | 930 } |
931 } | 931 } |
932 | 932 |
933 bool RenderWidgetHostViewWin::CanDispatchToConsumer( | 933 bool RenderWidgetHostViewWin::CanDispatchToConsumer( |
934 ui::GestureConsumer* consumer) { | 934 ui::GestureConsumer* consumer) { |
935 CHECK_EQ(static_cast<RenderWidgetHostViewWin*>(consumer), this); | 935 CHECK_EQ(static_cast<RenderWidgetHostViewWin*>(consumer), this); |
936 return true; | 936 return true; |
937 } | 937 } |
938 | 938 |
939 void RenderWidgetHostViewWin::DispatchPostponedGestureEvent( | |
940 ui::GestureEvent* event) { | |
941 ForwardGestureEventToRenderer(event); | |
942 } | |
943 | |
944 void RenderWidgetHostViewWin::DispatchCancelTouchEvent( | 939 void RenderWidgetHostViewWin::DispatchCancelTouchEvent( |
945 ui::TouchEvent* event) { | 940 ui::TouchEvent* event) { |
946 if (!render_widget_host_ || !touch_events_enabled_ || | 941 if (!render_widget_host_ || !touch_events_enabled_ || |
947 !render_widget_host_->ShouldForwardTouchEvent()) { | 942 !render_widget_host_->ShouldForwardTouchEvent()) { |
948 return; | 943 return; |
949 } | 944 } |
950 DCHECK(event->type() == blink::WebInputEvent::TouchCancel); | 945 DCHECK(event->type() == blink::WebInputEvent::TouchCancel); |
951 blink::WebTouchEvent cancel_event; | 946 blink::WebTouchEvent cancel_event; |
952 cancel_event.type = blink::WebInputEvent::TouchCancel; | 947 cancel_event.type = blink::WebInputEvent::TouchCancel; |
953 cancel_event.timeStampSeconds = event->time_stamp().InSecondsF(); | 948 cancel_event.timeStampSeconds = event->time_stamp().InSecondsF(); |
(...skipping 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3213 return new RenderWidgetHostViewWin(widget); | 3208 return new RenderWidgetHostViewWin(widget); |
3214 } | 3209 } |
3215 | 3210 |
3216 // static | 3211 // static |
3217 void RenderWidgetHostViewPort::GetDefaultScreenInfo( | 3212 void RenderWidgetHostViewPort::GetDefaultScreenInfo( |
3218 blink::WebScreenInfo* results) { | 3213 blink::WebScreenInfo* results) { |
3219 GetScreenInfoForWindow(0, results); | 3214 GetScreenInfoForWindow(0, results); |
3220 } | 3215 } |
3221 | 3216 |
3222 } // namespace content | 3217 } // namespace content |
OLD | NEW |