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

Unified Diff: third_party/WebKit/Source/core/input/BoundaryEventDispatcher.h

Issue 2255323004: Create MouseEventManager and EventHandlingUtil (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 4 years, 3 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/Source/core/input/BoundaryEventDispatcher.h
diff --git a/third_party/WebKit/Source/core/input/BoundaryEventDispatcher.h b/third_party/WebKit/Source/core/input/BoundaryEventDispatcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..85b62da72e2b8e6549eaf5ecae50a8f6fcb9f984
--- /dev/null
+++ b/third_party/WebKit/Source/core/input/BoundaryEventDispatcher.h
@@ -0,0 +1,36 @@
+// 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 BoundaryEventDispatcher_h
+#define BoundaryEventDispatcher_h
+
+#include "core/events/EventTarget.h"
+
+namespace blink {
+
+// This class contains the common logic of finding related node in a boundary
+// crossing action and sending boundary events. The subclasses of this class
+// must define what events should be sent in every case.
+class BoundaryEventDispatcher {
+ STACK_ALLOCATED()
+public:
+ BoundaryEventDispatcher() {}
+ virtual ~BoundaryEventDispatcher() {}
+
+ void sendBoundaryEvents(
+ EventTarget* exitedTarget,
+ EventTarget* enteredTarget);
+
+protected:
+ virtual void dispatchOut(EventTarget*, EventTarget* relatedTarget) = 0;
+ virtual void dispatchOver(EventTarget*, EventTarget* relatedTarget) = 0;
+ virtual void dispatchLeave(EventTarget*, EventTarget* relatedTarget, bool checkForListener) = 0;
+ virtual void dispatchEnter(EventTarget*, EventTarget* relatedTarget, bool checkForListener) = 0;
+ virtual AtomicString getLeaveEvent() = 0;
+ virtual AtomicString getEnterEvent() = 0;
+};
+
+} // namespace blink
+
+#endif // BoundaryEventDispatcher_h
« no previous file with comments | « third_party/WebKit/Source/core/input/BUILD.gn ('k') | third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698