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

Side by Side Diff: third_party/WebKit/Source/core/dom/ExecutionContext.h

Issue 2552993002: Rename activeDOMObjectsAreStopped to isContextDestroyed (Closed)
Patch Set: Created 4 years 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2012 Google Inc. All Rights Reserved. 3 * Copyright (C) 2012 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // TODO(haraken): Remove these methods by making the customers inherit from 137 // TODO(haraken): Remove these methods by making the customers inherit from
138 // ActiveDOMObject. ActiveDOMObject is a standard way to observe context 138 // ActiveDOMObject. ActiveDOMObject is a standard way to observe context
139 // suspension/resumption. 139 // suspension/resumption.
140 virtual bool tasksNeedSuspension() { return false; } 140 virtual bool tasksNeedSuspension() { return false; }
141 virtual void tasksWereSuspended() {} 141 virtual void tasksWereSuspended() {}
142 virtual void tasksWereResumed() {} 142 virtual void tasksWereResumed() {}
143 143
144 bool activeDOMObjectsAreSuspended() const { 144 bool activeDOMObjectsAreSuspended() const {
145 return m_activeDOMObjectsAreSuspended; 145 return m_activeDOMObjectsAreSuspended;
146 } 146 }
147 bool activeDOMObjectsAreStopped() const { 147 bool isContextDestroyed() const { return m_isContextDestroyed; }
148 return m_activeDOMObjectsAreStopped;
149 }
150 148
151 // Called after the construction of an ActiveDOMObject to synchronize suspend 149 // Called after the construction of an ActiveDOMObject to synchronize suspend
152 // state. 150 // state.
153 void suspendActiveDOMObjectIfNeeded(ActiveDOMObject*); 151 void suspendActiveDOMObjectIfNeeded(ActiveDOMObject*);
154 152
155 // Gets the next id in a circular sequence from 1 to 2^31-1. 153 // Gets the next id in a circular sequence from 1 to 2^31-1.
156 int circularSequentialID(); 154 int circularSequentialID();
157 155
158 virtual EventTarget* errorEventTarget() = 0; 156 virtual EventTarget* errorEventTarget() = 0;
159 virtual EventQueue* getEventQueue() const = 0; 157 virtual EventQueue* getEventQueue() const = 0;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 193
196 private: 194 private:
197 bool dispatchErrorEventInternal(ErrorEvent*, AccessControlStatus); 195 bool dispatchErrorEventInternal(ErrorEvent*, AccessControlStatus);
198 196
199 unsigned m_circularSequentialID; 197 unsigned m_circularSequentialID;
200 198
201 bool m_inDispatchErrorEvent; 199 bool m_inDispatchErrorEvent;
202 HeapVector<Member<ErrorEvent>> m_pendingExceptions; 200 HeapVector<Member<ErrorEvent>> m_pendingExceptions;
203 201
204 bool m_activeDOMObjectsAreSuspended; 202 bool m_activeDOMObjectsAreSuspended;
205 bool m_activeDOMObjectsAreStopped; 203 bool m_isContextDestroyed;
206 204
207 Member<PublicURLManager> m_publicURLManager; 205 Member<PublicURLManager> m_publicURLManager;
208 206
209 // Counter that keeps track of how many window interaction calls are allowed 207 // Counter that keeps track of how many window interaction calls are allowed
210 // for this ExecutionContext. Callers are expected to call 208 // for this ExecutionContext. Callers are expected to call
211 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to 209 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to
212 // increment and decrement the counter. 210 // increment and decrement the counter.
213 int m_windowInteractionTokens; 211 int m_windowInteractionTokens;
214 212
215 ReferrerPolicy m_referrerPolicy; 213 ReferrerPolicy m_referrerPolicy;
216 }; 214 };
217 215
218 } // namespace blink 216 } // namespace blink
219 217
220 #endif // ExecutionContext_h 218 #endif // ExecutionContext_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ActiveDOMObject.cpp ('k') | third_party/WebKit/Source/core/dom/ExecutionContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698