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

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: Actually add NewEventHandler 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
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..191cf14eb640bcafc07556eb824e2784ede3831a
--- /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*);
esprehn 2015/01/21 02:47:51 ref &
+ ~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&);
esprehn 2015/01/20 18:14:33 probably references to Node?
abarth-chromium 2015/01/20 21:37:56 Done.
+ 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_

Powered by Google App Engine
This is Rietveld 408576698