| 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 <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <InputScope.h> | 8 #include <InputScope.h> |
| 9 #include <wtsapi32.h> | 9 #include <wtsapi32.h> |
| 10 #pragma comment(lib, "wtsapi32.lib") | 10 #pragma comment(lib, "wtsapi32.lib") |
| (...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 | 929 |
| 930 ScopedVector<ui::TouchEvent> events; | 930 ScopedVector<ui::TouchEvent> events; |
| 931 if (!MakeUITouchEventsFromWebTouchEvents(touch, &events, LOCAL_COORDINATES)) | 931 if (!MakeUITouchEventsFromWebTouchEvents(touch, &events, LOCAL_COORDINATES)) |
| 932 return; | 932 return; |
| 933 | 933 |
| 934 ui::EventResult result = (ack_result == | 934 ui::EventResult result = (ack_result == |
| 935 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; | 935 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; |
| 936 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), | 936 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), |
| 937 end = events.end(); iter != end; ++iter) { | 937 end = events.end(); iter != end; ++iter) { |
| 938 (*iter)->latency()->AddLatencyNumber( | 938 (*iter)->latency()->AddLatencyNumber( |
| 939 ui::INPUT_EVENT_LATENCY_ACKED_COMPONENT, | 939 ui::INPUT_EVENT_LATENCY_ACKED_COMPONENT, 0, 0); |
| 940 static_cast<int64>(ack_result), | 940 render_widget_host_->ComputeTouchLatency(*((*iter)->latency())); |
| 941 0); | |
| 942 scoped_ptr<ui::GestureRecognizer::Gestures> gestures; | 941 scoped_ptr<ui::GestureRecognizer::Gestures> gestures; |
| 943 gestures.reset(gesture_recognizer_->ProcessTouchEventForGesture( | 942 gestures.reset(gesture_recognizer_->ProcessTouchEventForGesture( |
| 944 *(*iter), result, this)); | 943 *(*iter), result, this)); |
| 945 ProcessGestures(gestures.get()); | 944 ProcessGestures(gestures.get()); |
| 946 } | 945 } |
| 947 } | 946 } |
| 948 | 947 |
| 949 void RenderWidgetHostViewWin::UpdateDesiredTouchMode() { | 948 void RenderWidgetHostViewWin::UpdateDesiredTouchMode() { |
| 950 // Make sure that touch events even make sense. | 949 // Make sure that touch events even make sense. |
| 951 CommandLine* cmdline = CommandLine::ForCurrentProcess(); | 950 CommandLine* cmdline = CommandLine::ForCurrentProcess(); |
| (...skipping 2269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3221 return new RenderWidgetHostViewWin(widget); | 3220 return new RenderWidgetHostViewWin(widget); |
| 3222 } | 3221 } |
| 3223 | 3222 |
| 3224 // static | 3223 // static |
| 3225 void RenderWidgetHostViewPort::GetDefaultScreenInfo( | 3224 void RenderWidgetHostViewPort::GetDefaultScreenInfo( |
| 3226 WebKit::WebScreenInfo* results) { | 3225 WebKit::WebScreenInfo* results) { |
| 3227 GetScreenInfoForWindow(0, results); | 3226 GetScreenInfoForWindow(0, results); |
| 3228 } | 3227 } |
| 3229 | 3228 |
| 3230 } // namespace content | 3229 } // namespace content |
| OLD | NEW |