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

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

Issue 311733004: Introduce KeepAliveWhilePending to ScriptPromiseResolverWithContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@refactor-webmidi-initialization
Patch Set: Created 6 years, 6 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 11 matching lines...) Expand all
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 * 25 *
26 */ 26 */
27 27
28 #ifndef ExecutionContext_h 28 #ifndef ExecutionContext_h
29 #define ExecutionContext_h 29 #define ExecutionContext_h
30 30
31 #include "core/dom/ActiveDOMObject.h" 31 #include "core/dom/ActiveDOMObject.h"
32 #include "core/dom/AsyncInitializerContext.h"
32 #include "core/dom/ExecutionContextClient.h" 33 #include "core/dom/ExecutionContextClient.h"
33 #include "core/dom/SandboxFlags.h" 34 #include "core/dom/SandboxFlags.h"
34 #include "core/dom/SecurityContext.h" 35 #include "core/dom/SecurityContext.h"
35 #include "core/events/ErrorEvent.h" 36 #include "core/events/ErrorEvent.h"
36 #include "core/fetch/CrossOriginAccessControl.h" 37 #include "core/fetch/CrossOriginAccessControl.h"
37 #include "core/frame/ConsoleTypes.h" 38 #include "core/frame/ConsoleTypes.h"
38 #include "core/frame/DOMTimer.h" 39 #include "core/frame/DOMTimer.h"
39 #include "platform/LifecycleContext.h" 40 #include "platform/LifecycleContext.h"
40 #include "platform/Supplementable.h" 41 #include "platform/Supplementable.h"
41 #include "platform/weborigin/KURL.h" 42 #include "platform/weborigin/KURL.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 int circularSequentialID(); 116 int circularSequentialID();
116 117
117 void didChangeTimerAlignmentInterval(); 118 void didChangeTimerAlignmentInterval();
118 119
119 SandboxFlags sandboxFlags() const { return m_sandboxFlags; } 120 SandboxFlags sandboxFlags() const { return m_sandboxFlags; }
120 bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; } 121 bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; }
121 void enforceSandboxFlags(SandboxFlags mask); 122 void enforceSandboxFlags(SandboxFlags mask);
122 123
123 PassOwnPtr<LifecycleNotifier<ExecutionContext> > createLifecycleNotifier(); 124 PassOwnPtr<LifecycleNotifier<ExecutionContext> > createLifecycleNotifier();
124 125
126 AsyncInitializerContext& asyncInitializerContext() { return m_asyncInitializ erContext; }
127
125 virtual EventQueue* eventQueue() const = 0; 128 virtual EventQueue* eventQueue() const = 0;
126 129
127 protected: 130 protected:
128 131
129 ContextLifecycleNotifier& lifecycleNotifier(); 132 ContextLifecycleNotifier& lifecycleNotifier();
130 133
131 private: 134 private:
132 friend class DOMTimer; // For installNewTimeout() and removeTimeoutByID() be low. 135 friend class DOMTimer; // For installNewTimeout() and removeTimeoutByID() be low.
133 136
134 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta tus); 137 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta tus);
(...skipping 19 matching lines...) Expand all
154 157
155 bool m_activeDOMObjectsAreSuspended; 158 bool m_activeDOMObjectsAreSuspended;
156 bool m_activeDOMObjectsAreStopped; 159 bool m_activeDOMObjectsAreStopped;
157 160
158 OwnPtr<PublicURLManager> m_publicURLManager; 161 OwnPtr<PublicURLManager> m_publicURLManager;
159 162
160 // The location of this member is important; to make sure contextDestroyed() notification on 163 // The location of this member is important; to make sure contextDestroyed() notification on
161 // ExecutionContext's members (notably m_timeouts) is called before they are destructed, 164 // ExecutionContext's members (notably m_timeouts) is called before they are destructed,
162 // m_lifecycleNotifer should be placed *after* such members. 165 // m_lifecycleNotifer should be placed *after* such members.
163 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; 166 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier;
167
168 AsyncInitializerContext m_asyncInitializerContext;
164 }; 169 };
165 170
166 } // namespace WebCore 171 } // namespace WebCore
167 172
168 #endif // ExecutionContext_h 173 #endif // ExecutionContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698