diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-23 01:30:33 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-23 01:30:33 +0000 |
commit | 0a703230daa5b4fa2b51ce0f49458f8c8fd9df2d (patch) | |
tree | fe6ad13174da1df5aa99aefbd748c66a57f5f17c /chrome/plugin | |
parent | 372e877d5cd6b9ae180102fa9d2f1d47f412570c (diff) | |
download | chromium_src-0a703230daa5b4fa2b51ce0f49458f8c8fd9df2d.zip chromium_src-0a703230daa5b4fa2b51ce0f49458f8c8fd9df2d.tar.gz chromium_src-0a703230daa5b4fa2b51ce0f49458f8c8fd9df2d.tar.bz2 |
Make sure that seekable streams are removed from the list of resource clients maintained by WebPluginProxy.
The PluginStreamUrl object ensures that it notifies the webplugin object that it is being deleted in its destructor.
The other change is to remove the call to CancelRequest in WebPluginDelegateImpl::CreateResourceClient for
seekable streams, as this call does not do anything for manual streams created with a resource id of -1.
In any case for byte range requests, receiving a new response does not mean that earlier requests should
be cancelled.
This fixes bug http://code.google.com/p/chromium/issues/detail?id=12445
BUG=12445
Review URL: http://codereview.chromium.org/113772
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r-- | chrome/plugin/webplugin_proxy.cc | 14 | ||||
-rw-r--r-- | chrome/plugin/webplugin_proxy.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc index 2a84267..a0fd2ab 100644 --- a/chrome/plugin/webplugin_proxy.cc +++ b/chrome/plugin/webplugin_proxy.cc @@ -518,3 +518,17 @@ void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) { bool WebPluginProxy::IsOffTheRecord() { return channel_->off_the_record(); } + +void WebPluginProxy::ResourceClientDeleted( + WebPluginResourceClient* resource_client) { + ResourceClientMap::iterator index = resource_clients_.begin(); + while (index != resource_clients_.end()) { + WebPluginResourceClient* client = (*index).second; + + if (client == resource_client) { + resource_clients_.erase(index++); + } else { + index++; + } + } +} diff --git a/chrome/plugin/webplugin_proxy.h b/chrome/plugin/webplugin_proxy.h index e5594f0..46c16d1 100644 --- a/chrome/plugin/webplugin_proxy.h +++ b/chrome/plugin/webplugin_proxy.h @@ -112,6 +112,8 @@ class WebPluginProxy : public WebPlugin { bool IsOffTheRecord(); + void ResourceClientDeleted(WebPluginResourceClient* resource_client); + base::WaitableEvent* modal_dialog_event() { return modal_dialog_event_.get(); } |