diff options
author | Ben Murdoch <benm@google.com> | 2010-03-12 20:46:03 +0000 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-03-22 20:50:51 +0000 |
commit | a923424180b9d2cbe3a3951caed13039eef1edf6 (patch) | |
tree | 94c79707c7425deaee1f53e35512bd3760e6c8e9 /WebCore/loader | |
parent | 343ec940062f940a47d74fc359b661de8be2f3b8 (diff) | |
download | external_webkit-a923424180b9d2cbe3a3951caed13039eef1edf6.zip external_webkit-a923424180b9d2cbe3a3951caed13039eef1edf6.tar.gz external_webkit-a923424180b9d2cbe3a3951caed13039eef1edf6.tar.bz2 |
Add a new API on the resource loader to pause the current load. We use this when the plugin cannot accept any more data to prevent WebKit
buffering the data that the plugin can't take. This can result in a crash if the buffer gets too big (when watching an HD movie clip in
flash, for example).
Requires a frameworks/base change.
Change-Id: Ibb63d38df1014ff70fa4d65275613cbf3a217c1a
Diffstat (limited to 'WebCore/loader')
-rw-r--r-- | WebCore/loader/ResourceLoader.cpp | 9 | ||||
-rw-r--r-- | WebCore/loader/ResourceLoader.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/WebCore/loader/ResourceLoader.cpp b/WebCore/loader/ResourceLoader.cpp index 95ce209..d14afc8 100644 --- a/WebCore/loader/ResourceLoader.cpp +++ b/WebCore/loader/ResourceLoader.cpp @@ -149,6 +149,15 @@ void ResourceLoader::setDefersLoading(bool defers) } } +#if PLATFORM(ANDROID) +// TODO: This needs upstreaming to WebKit. +void ResourceLoader::pauseLoad(bool pause) +{ + if (m_handle) + m_handle->pauseLoad(pause); +} +#endif + FrameLoader* ResourceLoader::frameLoader() const { if (!m_frame) diff --git a/WebCore/loader/ResourceLoader.h b/WebCore/loader/ResourceLoader.h index 5239289..3178eb4 100644 --- a/WebCore/loader/ResourceLoader.h +++ b/WebCore/loader/ResourceLoader.h @@ -64,6 +64,10 @@ namespace WebCore { ResourceError cannotShowURLError(); virtual void setDefersLoading(bool); +#if PLATFORM(ANDROID) +// TODO: This needs upstreaming to WebKit. + virtual void pauseLoad(bool); +#endif void setIdentifier(unsigned long identifier) { m_identifier = identifier; } unsigned long identifier() const { return m_identifier; } |