summaryrefslogtreecommitdiffstats
path: root/WebCore/dom/ActiveDOMObject.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
commit635860845790a19bf50bbc51ba8fb66a96dde068 (patch)
treeef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/dom/ActiveDOMObject.h
parent8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff)
downloadexternal_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/dom/ActiveDOMObject.h')
-rw-r--r--WebCore/dom/ActiveDOMObject.h12
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: