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 int circularSequentialID(); | 123 int circularSequentialID(); |
124 | 124 |
125 PassOwnPtr<LifecycleNotifier<ExecutionContext> > createLifecycleNotifier(); | 125 PassOwnPtr<LifecycleNotifier<ExecutionContext> > createLifecycleNotifier(); |
126 | 126 |
127 virtual EventTarget* errorEventTarget() = 0; | 127 virtual EventTarget* errorEventTarget() = 0; |
128 virtual EventQueue* eventQueue() const = 0; | 128 virtual EventQueue* eventQueue() const = 0; |
129 | 129 |
130 void enforceStrictMixedContentChecking() { m_strictMixedContentCheckingEnfor
ced = true; } | 130 void enforceStrictMixedContentChecking() { m_strictMixedContentCheckingEnfor
ced = true; } |
131 bool shouldEnforceStrictMixedContentChecking() const { return m_strictMixedC
ontentCheckingEnforced; } | 131 bool shouldEnforceStrictMixedContentChecking() const { return m_strictMixedC
ontentCheckingEnforced; } |
132 | 132 |
133 void allowWindowFocus(); | 133 // Methods related to window interaction. It should be used to manage window |
134 void consumeWindowFocus(); | 134 // focusing and window creation permission for an ExecutionContext. |
135 bool isWindowFocusAllowed() const; | 135 void allowWindowInteraction(); |
| 136 void consumeWindowInteraction(); |
| 137 bool isWindowInteractionAllowed() const; |
136 | 138 |
137 protected: | 139 protected: |
138 ExecutionContext(); | 140 ExecutionContext(); |
139 virtual ~ExecutionContext(); | 141 virtual ~ExecutionContext(); |
140 | 142 |
141 virtual const KURL& virtualURL() const = 0; | 143 virtual const KURL& virtualURL() const = 0; |
142 virtual KURL virtualCompleteURL(const String&) const = 0; | 144 virtual KURL virtualCompleteURL(const String&) const = 0; |
143 | 145 |
144 ContextLifecycleNotifier& lifecycleNotifier(); | 146 ContextLifecycleNotifier& lifecycleNotifier(); |
145 | 147 |
(...skipping 14 matching lines...) Expand all Loading... |
160 | 162 |
161 bool m_activeDOMObjectsAreSuspended; | 163 bool m_activeDOMObjectsAreSuspended; |
162 bool m_activeDOMObjectsAreStopped; | 164 bool m_activeDOMObjectsAreStopped; |
163 | 165 |
164 OwnPtrWillBeMember<PublicURLManager> m_publicURLManager; | 166 OwnPtrWillBeMember<PublicURLManager> m_publicURLManager; |
165 | 167 |
166 bool m_strictMixedContentCheckingEnforced; | 168 bool m_strictMixedContentCheckingEnforced; |
167 | 169 |
168 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; | 170 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; |
169 | 171 |
170 // Counter that keeps track of how many window focus calls are allowed for | 172 // Counter that keeps track of how many window interaction calls are allowed |
171 // this ExecutionContext. Callers are expected to call |allowWindowFocus()| | 173 // for this ExecutionContext. Callers are expected to call |
172 // and |consumeWindowFocus()| in order to increment and decrement the | 174 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to |
173 // counter. | 175 // increment and decrement the counter. |
174 int m_windowFocusTokens; | 176 int m_windowInteractionTokens; |
175 }; | 177 }; |
176 | 178 |
177 } // namespace blink | 179 } // namespace blink |
178 | 180 |
179 #endif // ExecutionContext_h | 181 #endif // ExecutionContext_h |
OLD | NEW |