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

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

Issue 2587913002: Rename activeDOMObjectsAreSuspended to isContextSuspended (Closed)
Patch Set: temp Created 3 years, 12 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) 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 void suspendScheduledTasks(); 134 void suspendScheduledTasks();
135 void resumeScheduledTasks(); 135 void resumeScheduledTasks();
136 136
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 // SuspendableObject. SuspendableObject is a standard way to observe context 138 // SuspendableObject. SuspendableObject 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 isContextSuspended() const { return m_isContextSuspended; }
145 return m_activeDOMObjectsAreSuspended;
146 }
147 bool isContextDestroyed() const { return m_isContextDestroyed; } 145 bool isContextDestroyed() const { return m_isContextDestroyed; }
148 146
149 // Called after the construction of an SuspendableObject to synchronize 147 // Called after the construction of an SuspendableObject to synchronize
150 // suspend 148 // suspend
151 // state. 149 // state.
152 void suspendSuspendableObjectIfNeeded(SuspendableObject*); 150 void suspendSuspendableObjectIfNeeded(SuspendableObject*);
153 151
154 // Gets the next id in a circular sequence from 1 to 2^31-1. 152 // Gets the next id in a circular sequence from 1 to 2^31-1.
155 int circularSequentialID(); 153 int circularSequentialID();
156 154
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 virtual KURL virtualCompleteURL(const String&) const = 0; 191 virtual KURL virtualCompleteURL(const String&) const = 0;
194 192
195 private: 193 private:
196 bool dispatchErrorEventInternal(ErrorEvent*, AccessControlStatus); 194 bool dispatchErrorEventInternal(ErrorEvent*, AccessControlStatus);
197 195
198 unsigned m_circularSequentialID; 196 unsigned m_circularSequentialID;
199 197
200 bool m_inDispatchErrorEvent; 198 bool m_inDispatchErrorEvent;
201 HeapVector<Member<ErrorEvent>> m_pendingExceptions; 199 HeapVector<Member<ErrorEvent>> m_pendingExceptions;
202 200
203 bool m_activeDOMObjectsAreSuspended; 201 bool m_isContextSuspended;
204 bool m_isContextDestroyed; 202 bool m_isContextDestroyed;
205 203
206 Member<PublicURLManager> m_publicURLManager; 204 Member<PublicURLManager> m_publicURLManager;
207 205
208 // Counter that keeps track of how many window interaction calls are allowed 206 // Counter that keeps track of how many window interaction calls are allowed
209 // for this ExecutionContext. Callers are expected to call 207 // for this ExecutionContext. Callers are expected to call
210 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to 208 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to
211 // increment and decrement the counter. 209 // increment and decrement the counter.
212 int m_windowInteractionTokens; 210 int m_windowInteractionTokens;
213 211
214 ReferrerPolicy m_referrerPolicy; 212 ReferrerPolicy m_referrerPolicy;
215 }; 213 };
216 214
217 } // namespace blink 215 } // namespace blink
218 216
219 #endif // ExecutionContext_h 217 #endif // ExecutionContext_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.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