| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 bool isWindowFocusAllowed() const; | 141 bool isWindowFocusAllowed() const; |
| 142 | 142 |
| 143 protected: | 143 protected: |
| 144 ExecutionContext(); | 144 ExecutionContext(); |
| 145 virtual ~ExecutionContext(); | 145 virtual ~ExecutionContext(); |
| 146 | 146 |
| 147 virtual const KURL& virtualURL() const = 0; | 147 virtual const KURL& virtualURL() const = 0; |
| 148 virtual KURL virtualCompleteURL(const String&) const = 0; | 148 virtual KURL virtualCompleteURL(const String&) const = 0; |
| 149 | 149 |
| 150 ContextLifecycleNotifier& lifecycleNotifier(); | 150 ContextLifecycleNotifier& lifecycleNotifier(); |
| 151 void contextDestroyed() |
| 152 { |
| 153 LifecycleContext<ExecutionContext>::contextDestroyed(); |
| 154 } |
| 151 | 155 |
| 152 private: | 156 private: |
| 153 friend class DOMTimer; // For installNewTimeout() and removeTimeoutByID() be
low. | 157 friend class DOMTimer; // For installNewTimeout() and removeTimeoutByID() be
low. |
| 154 | 158 |
| 155 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta
tus); | 159 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta
tus); |
| 156 | 160 |
| 157 #if !ENABLE(OILPAN) | 161 #if !ENABLE(OILPAN) |
| 158 virtual void refExecutionContext() = 0; | 162 virtual void refExecutionContext() = 0; |
| 159 virtual void derefExecutionContext() = 0; | 163 virtual void derefExecutionContext() = 0; |
| 160 #endif | 164 #endif |
| (...skipping 29 matching lines...) Expand all Loading... |
| 190 // Counter that keeps track of how many window focus calls are allowed for | 194 // Counter that keeps track of how many window focus calls are allowed for |
| 191 // this ExecutionContext. Callers are expected to call |allowWindowFocus()| | 195 // this ExecutionContext. Callers are expected to call |allowWindowFocus()| |
| 192 // and |consumeWindowFocus()| in order to increment and decrement the | 196 // and |consumeWindowFocus()| in order to increment and decrement the |
| 193 // counter. | 197 // counter. |
| 194 int m_windowFocusTokens; | 198 int m_windowFocusTokens; |
| 195 }; | 199 }; |
| 196 | 200 |
| 197 } // namespace blink | 201 } // namespace blink |
| 198 | 202 |
| 199 #endif // ExecutionContext_h | 203 #endif // ExecutionContext_h |
| OLD | NEW |