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

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

Issue 2016383002: Set PointerType of pointer event on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 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
« no previous file with comments | « content/browser/renderer_host/web_input_event_aura.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/web_input_event_aura.h" 5 #include "content/browser/renderer_host/web_input_event_aura.h"
6 6
7 #include "base/event_types.h" 7 #include "base/event_types.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/renderer_host/input/web_input_event_builders_win.h" 10 #include "content/browser/renderer_host/input/web_input_event_builders_win.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 // On Windows, we can just use the builtin WebKit factory methods to fully 14 // On Windows, we can just use the builtin WebKit factory methods to fully
15 // construct our pre-translated events. 15 // construct our pre-translated events.
16 16
17 blink::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent( 17 blink::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent(
18 const base::NativeEvent& native_event, 18 const base::NativeEvent& native_event,
19 const base::TimeDelta& time_stamp) { 19 const base::TimeDelta& time_stamp,
20 blink::WebPointerProperties::PointerType pointer_type) {
20 return WebMouseEventBuilder::Build(native_event.hwnd, native_event.message, 21 return WebMouseEventBuilder::Build(native_event.hwnd, native_event.message,
21 native_event.wParam, native_event.lParam, 22 native_event.wParam, native_event.lParam,
22 time_stamp.InSecondsF()); 23 time_stamp.InSecondsF(), pointer_type);
23 } 24 }
24 25
25 blink::WebMouseWheelEvent MakeUntranslatedWebMouseWheelEventFromNativeEvent( 26 blink::WebMouseWheelEvent MakeUntranslatedWebMouseWheelEventFromNativeEvent(
26 const base::NativeEvent& native_event, 27 const base::NativeEvent& native_event,
27 const base::TimeDelta& time_stamp) { 28 const base::TimeDelta& time_stamp,
29 blink::WebPointerProperties::PointerType pointer_type) {
28 return WebMouseWheelEventBuilder::Build( 30 return WebMouseWheelEventBuilder::Build(
29 native_event.hwnd, native_event.message, native_event.wParam, 31 native_event.hwnd, native_event.message, native_event.wParam,
30 native_event.lParam, time_stamp.InSecondsF()); 32 native_event.lParam, time_stamp.InSecondsF(), pointer_type);
31 } 33 }
32 34
33 blink::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent( 35 blink::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent(
34 const base::NativeEvent& native_event, 36 const base::NativeEvent& native_event,
35 const base::TimeDelta& time_stamp) { 37 const base::TimeDelta& time_stamp) {
36 return WebKeyboardEventBuilder::Build( 38 return WebKeyboardEventBuilder::Build(
37 native_event.hwnd, native_event.message, native_event.wParam, 39 native_event.hwnd, native_event.message, native_event.wParam,
38 native_event.lParam, time_stamp.InSecondsF()); 40 native_event.lParam, time_stamp.InSecondsF());
39 } 41 }
40 42
41 blink::WebGestureEvent MakeWebGestureEventFromNativeEvent( 43 blink::WebGestureEvent MakeWebGestureEventFromNativeEvent(
42 const base::NativeEvent& native_event, 44 const base::NativeEvent& native_event,
43 const base::TimeDelta& time_stamp) { 45 const base::TimeDelta& time_stamp) {
44 // TODO: Create gestures from native event. 46 // TODO: Create gestures from native event.
45 NOTIMPLEMENTED(); 47 NOTIMPLEMENTED();
46 return blink::WebGestureEvent(); 48 return blink::WebGestureEvent();
47 } 49 }
48 50
49 } // namespace content 51 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/web_input_event_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698