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

Side by Side Diff: third_party/WebKit/Source/core/events/Event.h

Issue 2656343002: Replace [CallWith=ExecutionContext] with [CallWith=ScriptState] (Closed)
Patch Set: Few more Created 3 years, 10 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) 2001 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 22 matching lines...) Expand all
33 #include "core/events/EventPath.h" 33 #include "core/events/EventPath.h"
34 #include "platform/heap/Handle.h" 34 #include "platform/heap/Handle.h"
35 #include "wtf/Time.h" 35 #include "wtf/Time.h"
36 #include "wtf/text/AtomicString.h" 36 #include "wtf/text/AtomicString.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class DOMWrapperWorld; 40 class DOMWrapperWorld;
41 class EventDispatchMediator; 41 class EventDispatchMediator;
42 class EventTarget; 42 class EventTarget;
43 class ExecutionContext; 43 class ScriptState;
44 44
45 class CORE_EXPORT Event : public GarbageCollectedFinalized<Event>, 45 class CORE_EXPORT Event : public GarbageCollectedFinalized<Event>,
46 public ScriptWrappable { 46 public ScriptWrappable {
47 DEFINE_WRAPPERTYPEINFO(); 47 DEFINE_WRAPPERTYPEINFO();
48 48
49 public: 49 public:
50 enum PhaseType { 50 enum PhaseType {
51 kNone = 0, 51 kNone = 0,
52 kCapturingPhase = 1, 52 kCapturingPhase = 1,
53 kAtTarget = 2, 53 kAtTarget = 2,
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void stopImmediatePropagation() { m_immediatePropagationStopped = true; } 147 void stopImmediatePropagation() { m_immediatePropagationStopped = true; }
148 void setStopImmediatePropagation(bool stopImmediatePropagation) { 148 void setStopImmediatePropagation(bool stopImmediatePropagation) {
149 m_immediatePropagationStopped = stopImmediatePropagation; 149 m_immediatePropagationStopped = stopImmediatePropagation;
150 } 150 }
151 151
152 // IE Extensions 152 // IE Extensions
153 EventTarget* srcElement() const { 153 EventTarget* srcElement() const {
154 return target(); 154 return target();
155 } // MSIE extension - "the object that fired the event" 155 } // MSIE extension - "the object that fired the event"
156 156
157 bool legacyReturnValue(ExecutionContext*) const; 157 bool legacyReturnValue(ScriptState*) const;
158 void setLegacyReturnValue(ExecutionContext*, bool returnValue); 158 void setLegacyReturnValue(ScriptState*, bool returnValue);
159 159
160 virtual const AtomicString& interfaceName() const; 160 virtual const AtomicString& interfaceName() const;
161 bool hasInterface(const AtomicString&) const; 161 bool hasInterface(const AtomicString&) const;
162 162
163 // These events are general classes of events. 163 // These events are general classes of events.
164 virtual bool isUIEvent() const; 164 virtual bool isUIEvent() const;
165 virtual bool isMouseEvent() const; 165 virtual bool isMouseEvent() const;
166 virtual bool isFocusEvent() const; 166 virtual bool isFocusEvent() const;
167 virtual bool isKeyboardEvent() const; 167 virtual bool isKeyboardEvent() const;
168 virtual bool isTouchEvent() const; 168 virtual bool isTouchEvent() const;
(...skipping 22 matching lines...) Expand all
191 191
192 bool defaultPrevented() const { return m_defaultPrevented; } 192 bool defaultPrevented() const { return m_defaultPrevented; }
193 virtual void preventDefault(); 193 virtual void preventDefault();
194 void setDefaultPrevented(bool defaultPrevented) { 194 void setDefaultPrevented(bool defaultPrevented) {
195 m_defaultPrevented = defaultPrevented; 195 m_defaultPrevented = defaultPrevented;
196 } 196 }
197 197
198 bool defaultHandled() const { return m_defaultHandled; } 198 bool defaultHandled() const { return m_defaultHandled; }
199 void setDefaultHandled() { m_defaultHandled = true; } 199 void setDefaultHandled() { m_defaultHandled = true; }
200 200
201 bool cancelBubble(ExecutionContext* = nullptr) const { 201 bool cancelBubble(ScriptState* = nullptr) const {
202 return propagationStopped(); 202 return propagationStopped();
203 } 203 }
204 void setCancelBubble(ExecutionContext*, bool); 204 void setCancelBubble(ScriptState*, bool);
205 205
206 Event* underlyingEvent() const { return m_underlyingEvent.get(); } 206 Event* underlyingEvent() const { return m_underlyingEvent.get(); }
207 void setUnderlyingEvent(Event*); 207 void setUnderlyingEvent(Event*);
208 208
209 bool hasEventPath() { return m_eventPath; } 209 bool hasEventPath() { return m_eventPath; }
210 EventPath& eventPath() { 210 EventPath& eventPath() {
211 DCHECK(m_eventPath); 211 DCHECK(m_eventPath);
212 return *m_eventPath; 212 return *m_eventPath;
213 } 213 }
214 void initEventPath(Node&); 214 void initEventPath(Node&);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 TimeTicks m_platformTimeStamp; 306 TimeTicks m_platformTimeStamp;
307 }; 307 };
308 308
309 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ 309 #define DEFINE_EVENT_TYPE_CASTS(typeName) \
310 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), \ 310 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), \
311 event.is##typeName()) 311 event.is##typeName())
312 312
313 } // namespace blink 313 } // namespace blink
314 314
315 #endif // Event_h 315 #endif // Event_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.idl ('k') | third_party/WebKit/Source/core/events/Event.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698