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

Unified Diff: ui/events/blink/web_input_event.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/blink/scoped_web_input_event.cc ('k') | ui/events/blink/web_input_event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/blink/web_input_event.h
diff --git a/ui/events/blink/web_input_event.h b/ui/events/blink/web_input_event.h
new file mode 100644
index 0000000000000000000000000000000000000000..ac4dd017dfc68bea96cd5977b544531fc5c83329
--- /dev/null
+++ b/ui/events/blink/web_input_event.h
@@ -0,0 +1,59 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_EVENTS_BLINK_WEB_INPUT_EVENT_H_
+#define UI_EVENTS_BLINK_WEB_INPUT_EVENT_H_
+
+#include "base/callback.h"
+#include "third_party/WebKit/public/platform/WebInputEvent.h"
+
+namespace gfx {
+class Point;
+}
+
+namespace ui {
+class GestureEvent;
+class KeyEvent;
+class LocatedEvent;
+class MouseEvent;
+class MouseWheelEvent;
+class ScrollEvent;
+class TouchEvent;
+
+// Several methods take a |screen_location_callback| which should translate the
+// provided coordinates relative to the hosting window, rather than the top
+// level platform window.
+//
+// If a valid event cannot be created, then the returned events will have the
+// type UNKNOWN.
+//
+// TODO(jonross): Ideally this callback would not be needed. The callback should
+// be removed once ui::Event::root_location has been deprecated and replaced
+// with ui::Event::screen_location (crbug.com/608547)
+blink::WebMouseEvent MakeWebMouseEvent(
+ const MouseEvent& event,
+ const base::Callback<gfx::Point(const ui::LocatedEvent& event)>&
+ screen_location_callback);
+blink::WebMouseWheelEvent MakeWebMouseWheelEvent(
+ const MouseWheelEvent& event,
+ const base::Callback<gfx::Point(const ui::LocatedEvent& event)>&
+ screen_location_callback);
+blink::WebMouseWheelEvent MakeWebMouseWheelEvent(
+ const ScrollEvent& event,
+ const base::Callback<gfx::Point(const ui::LocatedEvent& event)>&
+ screen_location_callback);
+blink::WebKeyboardEvent MakeWebKeyboardEvent(const KeyEvent& event);
+blink::WebGestureEvent MakeWebGestureEvent(
+ const GestureEvent& event,
+ const base::Callback<gfx::Point(const ui::LocatedEvent& event)>&
+ screen_location_callback);
+blink::WebGestureEvent MakeWebGestureEvent(
+ const ScrollEvent& event,
+ const base::Callback<gfx::Point(const ui::LocatedEvent& event)>&
+ screen_location_callback);
+blink::WebGestureEvent MakeWebGestureEventFlingCancel();
+
+} // namespace ui
+
+#endif // UI_EVENTS_BLINK_WEB_INPUT_EVENT_H_
« no previous file with comments | « ui/events/blink/scoped_web_input_event.cc ('k') | ui/events/blink/web_input_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698