From 0a703230daa5b4fa2b51ce0f49458f8c8fd9df2d Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Sat, 23 May 2009 01:30:33 +0000 Subject: 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 --- chrome/plugin/webplugin_proxy.cc | 14 ++++++++++++++ chrome/plugin/webplugin_proxy.h | 2 ++ 2 files changed, 16 insertions(+) (limited to 'chrome/plugin') 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(); } -- cgit v1.1