OLD | NEW |
---|---|
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 void didChangeTimerAlignmentInterval(); | 123 void didChangeTimerAlignmentInterval(); |
124 | 124 |
125 SandboxFlags sandboxFlags() const { return m_sandboxFlags; } | 125 SandboxFlags sandboxFlags() const { return m_sandboxFlags; } |
126 bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; } | 126 bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; } |
127 void enforceSandboxFlags(SandboxFlags mask); | 127 void enforceSandboxFlags(SandboxFlags mask); |
128 | 128 |
129 PassOwnPtr<LifecycleNotifier<ExecutionContext> > createLifecycleNotifier(); | 129 PassOwnPtr<LifecycleNotifier<ExecutionContext> > createLifecycleNotifier(); |
130 | 130 |
131 virtual EventTarget* errorEventTarget() = 0; | 131 virtual EventTarget* errorEventTarget() = 0; |
132 virtual EventQueue* eventQueue() const = 0; | 132 virtual EventQueue* eventQueue() const = 0; |
133 virtual bool inBeforeUnloadEvent() const { return m_inBeforeUnloadEvent; } | |
134 virtual void setIsBeforeUnloadEvent(bool inBeforeUnloadEvent) { m_inBeforeUn loadEvent = inBeforeUnloadEvent; } | |
kouhei (in TOK)
2014/10/01 11:38:45
Can you use lifecycle methods in Document instead?
| |
133 | 135 |
134 protected: | 136 protected: |
135 ExecutionContext(); | 137 ExecutionContext(); |
136 virtual ~ExecutionContext(); | 138 virtual ~ExecutionContext(); |
137 | 139 |
138 virtual const KURL& virtualURL() const = 0; | 140 virtual const KURL& virtualURL() const = 0; |
139 virtual KURL virtualCompleteURL(const String&) const = 0; | 141 virtual KURL virtualCompleteURL(const String&) const = 0; |
140 | 142 |
141 ContextLifecycleNotifier& lifecycleNotifier(); | 143 ContextLifecycleNotifier& lifecycleNotifier(); |
142 | 144 |
(...skipping 24 matching lines...) Expand all Loading... | |
167 | 169 |
168 bool m_activeDOMObjectsAreSuspended; | 170 bool m_activeDOMObjectsAreSuspended; |
169 bool m_activeDOMObjectsAreStopped; | 171 bool m_activeDOMObjectsAreStopped; |
170 | 172 |
171 OwnPtr<PublicURLManager> m_publicURLManager; | 173 OwnPtr<PublicURLManager> m_publicURLManager; |
172 | 174 |
173 // The location of this member is important; to make sure contextDestroyed() notification on | 175 // The location of this member is important; to make sure contextDestroyed() notification on |
174 // ExecutionContext's members (notably m_timeouts) is called before they are destructed, | 176 // ExecutionContext's members (notably m_timeouts) is called before they are destructed, |
175 // m_lifecycleNotifer should be placed *after* such members. | 177 // m_lifecycleNotifer should be placed *after* such members. |
176 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; | 178 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; |
179 bool m_inBeforeUnloadEvent; | |
177 }; | 180 }; |
178 | 181 |
179 } // namespace blink | 182 } // namespace blink |
180 | 183 |
181 #endif // ExecutionContext_h | 184 #endif // ExecutionContext_h |
OLD | NEW |