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

Unified Diff: sky/engine/core/frame/NewEventHandler.h

Issue 823873004: Add basic PointerEvent support in NewEventHandler (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: git cl try Created 5 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
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/frame/NewEventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/frame/NewEventHandler.h
diff --git a/sky/engine/core/frame/NewEventHandler.h b/sky/engine/core/frame/NewEventHandler.h
new file mode 100644
index 0000000000000000000000000000000000000000..0fc5b845947b944a4afd4692526683c2dedae232
--- /dev/null
+++ b/sky/engine/core/frame/NewEventHandler.h
@@ -0,0 +1,47 @@
+// Copyright 2015 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 SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_
+#define SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_
+
+#include "sky/engine/core/dom/Node.h"
+#include "sky/engine/core/rendering/HitTestRequest.h"
+#include "sky/engine/core/rendering/HitTestResult.h"
+#include "sky/engine/wtf/HashMap.h"
+
+namespace blink {
+
+class LocalFrame;
+class WebPointerEvent;
+
+class NewEventHandler {
+ WTF_MAKE_NONCOPYABLE(NewEventHandler);
+public:
+ explicit NewEventHandler(LocalFrame&);
+ ~NewEventHandler();
+
+ bool handlePointerEvent(const WebPointerEvent&);
+
+private:
+ bool handlePointerDownEvent(const WebPointerEvent&);
+ bool handlePointerUpEvent(const WebPointerEvent&);
+ bool handlePointerMoveEvent(const WebPointerEvent&);
+ bool handlePointerCancelEvent(const WebPointerEvent&);
+
+ bool dispatchPointerEvent(Node& target, const WebPointerEvent&);
+ bool dispatchClickEvent(Node& capturingTarget, const WebPointerEvent&);
+
+ Node* targetForHitTestResult(const HitTestResult& hitTestResult);
+ HitTestResult performHitTest(const LayoutPoint&);
+ void updateSelectionForPointerDown(const HitTestResult&, const WebPointerEvent&);
+
+ typedef HashMap<int, RefPtr<Node>> PointerTargetMap;
+
+ LocalFrame& m_frame;
+ PointerTargetMap m_targetForPointer;
+};
+
+}
+
+#endif // SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/frame/NewEventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698