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

Unified Diff: third_party/WebKit/public/platform/WebMouseEvent.h

Issue 2590273002: Move WebMouseEvent into its own header file. (Closed)
Patch Set: Fix android build Created 3 years, 11 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
Index: third_party/WebKit/public/platform/WebMouseEvent.h
diff --git a/third_party/WebKit/public/platform/WebMouseEvent.h b/third_party/WebKit/public/platform/WebMouseEvent.h
new file mode 100644
index 0000000000000000000000000000000000000000..ec23a72f442ff2b38d364fd209ec010d1f54cd99
--- /dev/null
+++ b/third_party/WebKit/public/platform/WebMouseEvent.h
@@ -0,0 +1,67 @@
+// 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 WebMouseEvent_h
+#define WebMouseEvent_h
+
+#include "WebInputEvent.h"
+
+namespace blink {
+
+// See WebInputEvent.h for details why this pack is here.
+#pragma pack(push, 4)
+
+// WebMouseEvent --------------------------------------------------------------
+
+class WebMouseEvent : public WebInputEvent, public WebPointerProperties {
+ public:
+ // Renderer coordinates. Similar to viewport coordinates but without
+ // DevTools emulation transform or overscroll applied. i.e. the coordinates
+ // in Chromium's RenderView bounds.
+ int x;
+ int y;
+
+ // DEPRECATED (crbug.com/507787)
+ int windowX;
+ int windowY;
+
+ // Screen coordinate
+ int globalX;
+ int globalY;
+
+ int movementX;
+ int movementY;
+ int clickCount;
+
+ WebMouseEvent(Type type, int modifiers, double timeStampSeconds)
+ : WebInputEvent(sizeof(WebMouseEvent), type, modifiers, timeStampSeconds),
+ WebPointerProperties() {}
+
+ WebMouseEvent()
+ : WebInputEvent(sizeof(WebMouseEvent)), WebPointerProperties() {}
+
+#if INSIDE_BLINK
+ BLINK_PLATFORM_EXPORT WebFloatPoint movementInRootFrame() const;
+ BLINK_PLATFORM_EXPORT WebFloatPoint positionInRootFrame() const;
+#endif
+
+ protected:
+ explicit WebMouseEvent(unsigned sizeParam)
+ : WebInputEvent(sizeParam), WebPointerProperties() {}
+
+ WebMouseEvent(unsigned sizeParam,
+ Type type,
+ int modifiers,
+ double timeStampSeconds)
+ : WebInputEvent(sizeParam, type, modifiers, timeStampSeconds),
+ WebPointerProperties() {}
+
+ void flattenTransformSelf();
+};
+
+#pragma pack(pop)
+
+} // namespace blink
+
+#endif // WebMouseEvent_h
« no previous file with comments | « third_party/WebKit/public/platform/WebInputEvent.h ('k') | third_party/WebKit/public/platform/WebMouseWheelEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698