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

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

Issue 19676008: Import windows WebInputEvent factory to content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove dead code, fix namespace for aurawin Created 7 years, 5 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
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 "third_party/WebKit/public/web/win/WebInputEventFactory.h" 9 #include "content/browser/renderer_host/input/web_input_event_builders_win.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 // On Windows, we can just use the builtin WebKit factory methods to fully 13 // On Windows, we can just use the builtin WebKit factory methods to fully
14 // construct our pre-translated events. 14 // construct our pre-translated events.
15 15
16 WebKit::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent( 16 WebKit::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent(
17 base::NativeEvent native_event) { 17 base::NativeEvent native_event) {
18 return WebKit::WebInputEventFactory::mouseEvent(native_event.hwnd, 18 return WebMouseEventBuilder::Build(native_event.hwnd,
19 native_event.message, 19 native_event.message,
20 native_event.wParam, 20 native_event.wParam,
21 native_event.lParam); 21 native_event.lParam);
22 } 22 }
23 23
24 WebKit::WebMouseWheelEvent MakeUntranslatedWebMouseWheelEventFromNativeEvent( 24 WebKit::WebMouseWheelEvent MakeUntranslatedWebMouseWheelEventFromNativeEvent(
25 base::NativeEvent native_event) { 25 base::NativeEvent native_event) {
26 return WebKit::WebInputEventFactory::mouseWheelEvent(native_event.hwnd, 26 return WebMouseWheelEventBuilder::Build(native_event.hwnd,
27 native_event.message, 27 native_event.message,
28 native_event.wParam, 28 native_event.wParam,
29 native_event.lParam); 29 native_event.lParam);
30 } 30 }
31 31
32 WebKit::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent( 32 WebKit::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent(
33 base::NativeEvent native_event) { 33 base::NativeEvent native_event) {
34 return WebKit::WebInputEventFactory::keyboardEvent(native_event.hwnd, 34 return WebKeyboardEventBuilder::Build(native_event.hwnd,
35 native_event.message, 35 native_event.message,
36 native_event.wParam, 36 native_event.wParam,
37 native_event.lParam); 37 native_event.lParam);
38 } 38 }
39 39
40 WebKit::WebGestureEvent MakeWebGestureEventFromNativeEvent( 40 WebKit::WebGestureEvent MakeWebGestureEventFromNativeEvent(
41 base::NativeEvent native_event) { 41 base::NativeEvent native_event) {
42 // TODO: Create gestures from native event. 42 // TODO: Create gestures from native event.
43 NOTIMPLEMENTED(); 43 NOTIMPLEMENTED();
44 return WebKit::WebGestureEvent(); 44 return WebKit::WebGestureEvent();
45 } 45 }
46 46
47 } // namespace content 47 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698