| 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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 DCHECK(touch_events_enabled_); | 928 DCHECK(touch_events_enabled_); |
| 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( | |
| 939 ui::INPUT_EVENT_LATENCY_ACKED_COMPONENT, | |
| 940 static_cast<int64>(ack_result), | |
| 941 0); | |
| 942 scoped_ptr<ui::GestureRecognizer::Gestures> gestures; | 938 scoped_ptr<ui::GestureRecognizer::Gestures> gestures; |
| 943 gestures.reset(gesture_recognizer_->ProcessTouchEventForGesture( | 939 gestures.reset(gesture_recognizer_->ProcessTouchEventForGesture( |
| 944 *(*iter), result, this)); | 940 *(*iter), result, this)); |
| 945 ProcessGestures(gestures.get()); | 941 ProcessGestures(gestures.get()); |
| 946 } | 942 } |
| 947 } | 943 } |
| 948 | 944 |
| 949 void RenderWidgetHostViewWin::UpdateDesiredTouchMode() { | 945 void RenderWidgetHostViewWin::UpdateDesiredTouchMode() { |
| 950 // Make sure that touch events even make sense. | 946 // Make sure that touch events even make sense. |
| 951 CommandLine* cmdline = CommandLine::ForCurrentProcess(); | 947 CommandLine* cmdline = CommandLine::ForCurrentProcess(); |
| (...skipping 2270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3222 return new RenderWidgetHostViewWin(widget); | 3218 return new RenderWidgetHostViewWin(widget); |
| 3223 } | 3219 } |
| 3224 | 3220 |
| 3225 // static | 3221 // static |
| 3226 void RenderWidgetHostViewPort::GetDefaultScreenInfo( | 3222 void RenderWidgetHostViewPort::GetDefaultScreenInfo( |
| 3227 WebKit::WebScreenInfo* results) { | 3223 WebKit::WebScreenInfo* results) { |
| 3228 GetScreenInfoForWindow(0, results); | 3224 GetScreenInfoForWindow(0, results); |
| 3229 } | 3225 } |
| 3230 | 3226 |
| 3231 } // namespace content | 3227 } // namespace content |
| OLD | NEW |