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

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

Issue 2234023002: Refactor WebInputEventAura to ui/events/blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/browser/renderer_host/web_input_event_aura.h"
6
7 #include "base/event_types.h"
8 #include "base/logging.h"
9 #include "base/time/time.h"
10 #include "content/browser/renderer_host/input/web_input_event_builders_win.h"
11 #include "ui/events/base_event_utils.h"
12
13 namespace content {
14
15 // On Windows, we can just use the builtin WebKit factory methods to fully
16 // construct our pre-translated events.
17
18 blink::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent(
19 const base::NativeEvent& native_event,
20 const base::TimeTicks& time_stamp,
21 blink::WebPointerProperties::PointerType pointer_type) {
22 return WebMouseEventBuilder::Build(native_event.hwnd, native_event.message,
23 native_event.wParam, native_event.lParam,
24 ui::EventTimeStampToSeconds(time_stamp),
25 pointer_type);
26 }
27
28 blink::WebMouseWheelEvent MakeUntranslatedWebMouseWheelEventFromNativeEvent(
29 const base::NativeEvent& native_event,
30 const base::TimeTicks& time_stamp,
31 blink::WebPointerProperties::PointerType pointer_type) {
32 return WebMouseWheelEventBuilder::Build(
33 native_event.hwnd, native_event.message, native_event.wParam,
34 native_event.lParam, ui::EventTimeStampToSeconds(time_stamp),
35 pointer_type);
36 }
37
38 blink::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent(
39 const base::NativeEvent& native_event,
40 const base::TimeTicks& time_stamp) {
41 return WebKeyboardEventBuilder::Build(
42 native_event.hwnd, native_event.message, native_event.wParam,
43 native_event.lParam, ui::EventTimeStampToSeconds(time_stamp));
44 }
45
46 blink::WebGestureEvent MakeWebGestureEventFromNativeEvent(
47 const base::NativeEvent& native_event,
48 const base::TimeTicks& time_stamp) {
49 // TODO: Create gestures from native event.
50 NOTIMPLEMENTED();
51 return blink::WebGestureEvent();
52 }
53
54 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/web_input_event_aura_unittest.cc ('k') | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698