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

Side by Side Diff: sky/engine/core/events/EventDispatcher.h

Issue 870073003: Remove mouse events from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Library General Public 11 * modify it under the terms of the GNU Library General Public
12 * License as published by the Free Software Foundation; either 12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version. 13 * version 2 of the License, or (at your option) any later version.
14 * 14 *
15 * This library is distributed in the hope that it will be useful, 15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Library General Public License for more details. 18 * Library General Public License for more details.
19 * 19 *
20 * You should have received a copy of the GNU Library General Public License 20 * You should have received a copy of the GNU Library General Public License
21 * along with this library; see the file COPYING.LIB. If not, write to 21 * along with this library; see the file COPYING.LIB. If not, write to
22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 * Boston, MA 02110-1301, USA. 23 * Boston, MA 02110-1301, USA.
24 */ 24 */
25 25
26 #ifndef SKY_ENGINE_CORE_EVENTS_EVENTDISPATCHER_H_ 26 #ifndef SKY_ENGINE_CORE_EVENTS_EVENTDISPATCHER_H_
27 #define SKY_ENGINE_CORE_EVENTS_EVENTDISPATCHER_H_ 27 #define SKY_ENGINE_CORE_EVENTS_EVENTDISPATCHER_H_
28 28
29 #include "sky/engine/core/dom/SimulatedClickOptions.h"
30 #include "sky/engine/platform/heap/Handle.h" 29 #include "sky/engine/platform/heap/Handle.h"
31 #include "sky/engine/wtf/PassRefPtr.h" 30 #include "sky/engine/wtf/PassRefPtr.h"
32 #include "sky/engine/wtf/RefPtr.h" 31 #include "sky/engine/wtf/RefPtr.h"
33 32
34 namespace blink { 33 namespace blink {
35 34
36 class Event; 35 class Event;
37 class EventDispatchMediator; 36 class EventDispatchMediator;
38 class FrameView; 37 class FrameView;
39 class Node; 38 class Node;
40 class NodeEventContext; 39 class NodeEventContext;
41 class WindowEventContext; 40 class WindowEventContext;
42 41
43 enum EventDispatchContinuation { 42 enum EventDispatchContinuation {
44 ContinueDispatching, 43 ContinueDispatching,
45 DoneDispatching 44 DoneDispatching
46 }; 45 };
47 46
48 class EventDispatcher { 47 class EventDispatcher {
49 STACK_ALLOCATED(); 48 STACK_ALLOCATED();
50 public: 49 public:
51 static bool dispatchEvent(Node*, PassRefPtr<EventDispatchMediator>); 50 static bool dispatchEvent(Node*, PassRefPtr<EventDispatchMediator>);
52 static void dispatchScopedEvent(Node*, PassRefPtr<EventDispatchMediator>); 51 static void dispatchScopedEvent(Node*, PassRefPtr<EventDispatchMediator>);
53 52
54 static void dispatchSimulatedClick(Node*, Event* underlyingEvent, SimulatedC lickMouseEventOptions);
55
56 bool dispatch(); 53 bool dispatch();
57 Node* node() const { return m_node.get(); } 54 Node* node() const { return m_node.get(); }
58 Event* event() const { return m_event.get(); } 55 Event* event() const { return m_event.get(); }
59 56
60 private: 57 private:
61 EventDispatcher(Node*, PassRefPtr<Event>); 58 EventDispatcher(Node*, PassRefPtr<Event>);
62 const NodeEventContext* topNodeEventContext(); 59 const NodeEventContext* topNodeEventContext();
63 60
64 EventDispatchContinuation dispatchEventPreProcess(); 61 EventDispatchContinuation dispatchEventPreProcess();
65 EventDispatchContinuation dispatchEventAtCapturing(WindowEventContext&); 62 EventDispatchContinuation dispatchEventAtCapturing(WindowEventContext&);
66 EventDispatchContinuation dispatchEventAtTarget(); 63 EventDispatchContinuation dispatchEventAtTarget();
67 void dispatchEventAtBubbling(WindowEventContext&); 64 void dispatchEventAtBubbling(WindowEventContext&);
68 void dispatchEventPostProcess(); 65 void dispatchEventPostProcess();
69 66
70 RefPtr<Node> m_node; 67 RefPtr<Node> m_node;
71 RefPtr<Event> m_event; 68 RefPtr<Event> m_event;
72 RefPtr<FrameView> m_view; 69 RefPtr<FrameView> m_view;
73 #if ENABLE(ASSERT) 70 #if ENABLE(ASSERT)
74 bool m_eventDispatched; 71 bool m_eventDispatched;
75 #endif 72 #endif
76 }; 73 };
77 74
78 } 75 }
79 76
80 #endif // SKY_ENGINE_CORE_EVENTS_EVENTDISPATCHER_H_ 77 #endif // SKY_ENGINE_CORE_EVENTS_EVENTDISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698