summaryrefslogtreecommitdiffstats
path: root/WebCore/dom/ScriptExecutionContext.h
diff options
context:
space:
mode:
authorFeng Qian <>2009-04-10 18:11:29 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-10 18:11:29 -0700
commit8f72e70a9fd78eec56623b3a62e68f16b7b27e28 (patch)
tree181bf9a400c30a1bf34ea6d72560e8d00111d549 /WebCore/dom/ScriptExecutionContext.h
parent7ed56f225e0ade046e1c2178977f72b2d896f196 (diff)
downloadexternal_webkit-8f72e70a9fd78eec56623b3a62e68f16b7b27e28.zip
external_webkit-8f72e70a9fd78eec56623b3a62e68f16b7b27e28.tar.gz
external_webkit-8f72e70a9fd78eec56623b3a62e68f16b7b27e28.tar.bz2
AI 145796: Land the WebKit merge @r42026.
Automated import of CL 145796
Diffstat (limited to 'WebCore/dom/ScriptExecutionContext.h')
-rw-r--r--WebCore/dom/ScriptExecutionContext.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/WebCore/dom/ScriptExecutionContext.h b/WebCore/dom/ScriptExecutionContext.h
index 6f09e1a..7b2f36a 100644
--- a/WebCore/dom/ScriptExecutionContext.h
+++ b/WebCore/dom/ScriptExecutionContext.h
@@ -37,6 +37,7 @@
namespace WebCore {
class ActiveDOMObject;
+ class DOMTimer;
class MessagePort;
class SecurityOrigin;
class ScriptString;
@@ -58,12 +59,15 @@ namespace WebCore {
const KURL& url() const { return virtualURL(); }
KURL completeURL(const String& url) const { return virtualCompleteURL(url); }
+ virtual String userAgent(const KURL&) const = 0;
+
SecurityOrigin* securityOrigin() const { return m_securityOrigin.get(); }
virtual void reportException(const String& errorMessage, int lineNumber, const String& sourceURL) = 0;
virtual void addMessage(MessageDestination, MessageSource, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL) = 0;
virtual void resourceRetrievedByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString) = 0;
-
+ virtual void scriptImported(unsigned long, const String&) = 0;
+
// Active objects are not garbage collected even if inaccessible, e.g. because their activity may result in callbacks being invoked.
bool canSuspendActiveDOMObjects();
// Active objects can be asked to suspend even if canSuspendActiveDOMObjects() returns 'false' -
@@ -94,6 +98,10 @@ namespace WebCore {
virtual void postTask(PassRefPtr<Task>) = 0; // Executes the task on context's thread asynchronously.
+ void addTimeout(int timeoutId, DOMTimer*);
+ void removeTimeout(int timeoutId);
+ DOMTimer* findTimeout(int timeoutId);
+
protected:
// Explicitly override the security origin for this script context.
// Note: It is dangerous to change the security origin of a script context
@@ -110,6 +118,8 @@ namespace WebCore {
HashMap<ActiveDOMObject*, void*> m_activeDOMObjects;
+ HashMap<int, DOMTimer*> m_timeouts;
+
virtual void refScriptExecutionContext() = 0;
virtual void derefScriptExecutionContext() = 0;
};