diff options
Diffstat (limited to 'WebCore/dom/ActiveDOMObject.h')
-rw-r--r-- | WebCore/dom/ActiveDOMObject.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/WebCore/dom/ActiveDOMObject.h b/WebCore/dom/ActiveDOMObject.h index 601219c..e58d3f9 100644 --- a/WebCore/dom/ActiveDOMObject.h +++ b/WebCore/dom/ActiveDOMObject.h @@ -38,9 +38,19 @@ namespace WebCore { ActiveDOMObject(ScriptExecutionContext*, void* upcastPointer); ScriptExecutionContext* scriptExecutionContext() const { return m_scriptExecutionContext; } - bool hasPendingActivity() { return m_pendingActivityCount; } + virtual bool hasPendingActivity() const; virtual void contextDestroyed(); + + // canSuspend() is used by the caller if there is a choice between suspending and stopping. + // For example, a page won't be suspended and placed in the back/forward cache if it has + // the objects that can not be suspended. + // However, 'suspend' can be called even if canSuspend() would return 'false'. That + // happens in step-by-step JS debugging for example - in this case it would be incorrect + // to stop the object. Exact semantics of suspend is up to the object then. + virtual bool canSuspend() const; + virtual void suspend(); + virtual void resume(); virtual void stop(); protected: |