| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 void enforceSandboxFlags(SandboxFlags mask); | 129 void enforceSandboxFlags(SandboxFlags mask); |
| 130 | 130 |
| 131 PassOwnPtr<LifecycleNotifier<ExecutionContext> > createLifecycleNotifier(); | 131 PassOwnPtr<LifecycleNotifier<ExecutionContext> > createLifecycleNotifier(); |
| 132 | 132 |
| 133 virtual EventTarget* errorEventTarget() = 0; | 133 virtual EventTarget* errorEventTarget() = 0; |
| 134 virtual EventQueue* eventQueue() const = 0; | 134 virtual EventQueue* eventQueue() const = 0; |
| 135 | 135 |
| 136 void enforceStrictMixedContentChecking() { m_strictMixedContentCheckingEnfor
ced = true; } | 136 void enforceStrictMixedContentChecking() { m_strictMixedContentCheckingEnfor
ced = true; } |
| 137 bool shouldEnforceStrictMixedContentChecking() const { return m_strictMixedC
ontentCheckingEnforced; } | 137 bool shouldEnforceStrictMixedContentChecking() const { return m_strictMixedC
ontentCheckingEnforced; } |
| 138 | 138 |
| 139 void allowWindowFocus(); |
| 140 void consumeWindowFocus(); |
| 141 bool isWindowFocusAllowed() const; |
| 142 |
| 139 protected: | 143 protected: |
| 140 ExecutionContext(); | 144 ExecutionContext(); |
| 141 virtual ~ExecutionContext(); | 145 virtual ~ExecutionContext(); |
| 142 | 146 |
| 143 virtual const KURL& virtualURL() const = 0; | 147 virtual const KURL& virtualURL() const = 0; |
| 144 virtual KURL virtualCompleteURL(const String&) const = 0; | 148 virtual KURL virtualCompleteURL(const String&) const = 0; |
| 145 | 149 |
| 146 ContextLifecycleNotifier& lifecycleNotifier(); | 150 ContextLifecycleNotifier& lifecycleNotifier(); |
| 147 | 151 |
| 148 private: | 152 private: |
| (...skipping 26 matching lines...) Expand all Loading... |
| 175 bool m_activeDOMObjectsAreStopped; | 179 bool m_activeDOMObjectsAreStopped; |
| 176 | 180 |
| 177 OwnPtrWillBeMember<PublicURLManager> m_publicURLManager; | 181 OwnPtrWillBeMember<PublicURLManager> m_publicURLManager; |
| 178 | 182 |
| 179 bool m_strictMixedContentCheckingEnforced; | 183 bool m_strictMixedContentCheckingEnforced; |
| 180 | 184 |
| 181 // The location of this member is important; to make sure contextDestroyed()
notification on | 185 // The location of this member is important; to make sure contextDestroyed()
notification on |
| 182 // ExecutionContext's members (notably m_timeouts) is called before they are
destructed, | 186 // ExecutionContext's members (notably m_timeouts) is called before they are
destructed, |
| 183 // m_lifecycleNotifer should be placed *after* such members. | 187 // m_lifecycleNotifer should be placed *after* such members. |
| 184 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; | 188 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; |
| 189 |
| 190 // Counter that keeps track of how many window focus calls are allowed for |
| 191 // this ExecutionContext. Callers are expected to call |allowWindowFocus()| |
| 192 // and |consumeWindowFocus()| in order to increment and decrement the |
| 193 // counter. |
| 194 int m_windowFocusTokens; |
| 185 }; | 195 }; |
| 186 | 196 |
| 187 } // namespace blink | 197 } // namespace blink |
| 188 | 198 |
| 189 #endif // ExecutionContext_h | 199 #endif // ExecutionContext_h |
| OLD | NEW |