From 635860845790a19bf50bbc51ba8fb66a96dde068 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Thu, 5 Mar 2009 14:34:32 -0800 Subject: auto import from //depot/cupcake/@136594 --- WebCore/dom/ActiveDOMObject.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'WebCore/dom/ActiveDOMObject.h') 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: -- cgit v1.1