| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 KURL completeURL(const String& url) const; | 75 KURL completeURL(const String& url) const; |
| 76 void userEventWasHandled(); | 76 void userEventWasHandled(); |
| 77 void disableEval(const String& errorMessage); | 77 void disableEval(const String& errorMessage); |
| 78 DOMWindow* executingWindow() const; | 78 DOMWindow* executingWindow() const; |
| 79 String userAgent(const KURL&) const; | 79 String userAgent(const KURL&) const; |
| 80 void postTask(PassOwnPtr<ExecutionContextTask>); | 80 void postTask(PassOwnPtr<ExecutionContextTask>); |
| 81 void postTask(const Closure&); | 81 void postTask(const Closure&); |
| 82 double timerAlignmentInterval() const; | 82 double timerAlignmentInterval() const; |
| 83 | 83 |
| 84 bool shouldSanitizeScriptError(const String& sourceURL, AccessControlStatus)
; | 84 bool shouldSanitizeScriptError(const String& sourceURL, AccessControlStatus)
; |
| 85 void reportException(PassRefPtr<ErrorEvent>, PassRefPtr<ScriptCallStack>, Ac
cessControlStatus); | 85 void reportException(PassRefPtrWillBeRawPtr<ErrorEvent>, PassRefPtr<ScriptCa
llStack>, AccessControlStatus); |
| 86 | 86 |
| 87 void addConsoleMessage(MessageSource, MessageLevel, const String& message, c
onst String& sourceURL, unsigned lineNumber); | 87 void addConsoleMessage(MessageSource, MessageLevel, const String& message, c
onst String& sourceURL, unsigned lineNumber); |
| 88 void addConsoleMessage(MessageSource, MessageLevel, const String& message, S
criptState* = 0); | 88 void addConsoleMessage(MessageSource, MessageLevel, const String& message, S
criptState* = 0); |
| 89 | 89 |
| 90 PublicURLManager& publicURLManager(); | 90 PublicURLManager& publicURLManager(); |
| 91 | 91 |
| 92 // Active objects are not garbage collected even if inaccessible, e.g. becau
se their activity may result in callbacks being invoked. | 92 // Active objects are not garbage collected even if inaccessible, e.g. becau
se their activity may result in callbacks being invoked. |
| 93 bool hasPendingActivity(); | 93 bool hasPendingActivity(); |
| 94 | 94 |
| 95 void suspendActiveDOMObjects(); | 95 void suspendActiveDOMObjects(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 124 | 124 |
| 125 virtual EventQueue* eventQueue() const = 0; | 125 virtual EventQueue* eventQueue() const = 0; |
| 126 | 126 |
| 127 protected: | 127 protected: |
| 128 | 128 |
| 129 ContextLifecycleNotifier& lifecycleNotifier(); | 129 ContextLifecycleNotifier& lifecycleNotifier(); |
| 130 | 130 |
| 131 private: | 131 private: |
| 132 friend class DOMTimer; // For installNewTimeout() and removeTimeoutByID() be
low. | 132 friend class DOMTimer; // For installNewTimeout() and removeTimeoutByID() be
low. |
| 133 | 133 |
| 134 bool dispatchErrorEvent(PassRefPtr<ErrorEvent>, AccessControlStatus); | 134 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta
tus); |
| 135 | 135 |
| 136 virtual void refExecutionContext() = 0; | 136 virtual void refExecutionContext() = 0; |
| 137 virtual void derefExecutionContext() = 0; | 137 virtual void derefExecutionContext() = 0; |
| 138 // LifecycleContext implementation. | 138 // LifecycleContext implementation. |
| 139 | 139 |
| 140 // Implementation details for DOMTimer. No other classes should call these f
unctions. | 140 // Implementation details for DOMTimer. No other classes should call these f
unctions. |
| 141 int installNewTimeout(PassOwnPtr<ScheduledAction>, int timeout, bool singleS
hot); | 141 int installNewTimeout(PassOwnPtr<ScheduledAction>, int timeout, bool singleS
hot); |
| 142 void removeTimeoutByID(int timeoutID); // This makes underlying DOMTimer ins
tance destructed. | 142 void removeTimeoutByID(int timeoutID); // This makes underlying DOMTimer ins
tance destructed. |
| 143 | 143 |
| 144 ExecutionContextClient* m_client; | 144 ExecutionContextClient* m_client; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 159 | 159 |
| 160 // The location of this member is important; to make sure contextDestroyed()
notification on | 160 // 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, | 161 // ExecutionContext's members (notably m_timeouts) is called before they are
destructed, |
| 162 // m_lifecycleNotifer should be placed *after* such members. | 162 // m_lifecycleNotifer should be placed *after* such members. |
| 163 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; | 163 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 } // namespace WebCore | 166 } // namespace WebCore |
| 167 | 167 |
| 168 #endif // ExecutionContext_h | 168 #endif // ExecutionContext_h |
| OLD | NEW |