From 42887efa99e289a175fb019ae96bffada8118cdd Mon Sep 17 00:00:00 2001 From: "pasko@chromium.org" Date: Wed, 25 Sep 2013 13:03:24 +0000 Subject: [PATCH] Revert 225099 "Cancel resources in the plugin process when a use..." Reason: androidwebview_instrumentation_tests failing starting from this build: http://build.chromium.org/p/chromium.linux/builders/Android%20Tests%20%28dbg%29/builds/14741 Locally verified that at least this test starts passing after revert: org.chromium.android_webview.test.AndroidScrollIntegrationTest#testNoSpuriousOverScrolls Unsolved mystery remains around the passing trybot with the Rietveld issue: http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered_tests/builds/89522 > Cancel resources in the plugin process when a user presses the stop button or window.stop() is called. > > BUG=286074 > R=ananta@chromium.org > > Review URL: https://codereview.chromium.org/24302012 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/24570003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225179 0039d316-1c4b-4281-b951-d872f2087c98 --- content/child/npapi/webplugin_delegate_impl.h | 1 + content/child/plugin_messages.h | 3 --- content/plugin/plugin_channel.cc | 11 ----------- content/plugin/plugin_channel.h | 1 - content/plugin/webplugin_delegate_stub.h | 1 - content/renderer/render_frame_impl.cc | 7 ------- content/renderer/render_frame_impl.h | 1 - 7 files changed, 1 insertion(+), 24 deletions(-) diff --git a/content/child/npapi/webplugin_delegate_impl.h b/content/child/npapi/webplugin_delegate_impl.h index 4a8c88815cc2..a7a134493a92 100644 --- a/content/child/npapi/webplugin_delegate_impl.h +++ b/content/child/npapi/webplugin_delegate_impl.h @@ -42,6 +42,7 @@ class CARenderer; namespace content { class PluginInstance; +class PluginURLFetcher; class WebPlugin; #if defined(OS_MACOSX) diff --git a/content/child/plugin_messages.h b/content/child/plugin_messages.h index 404439f2eff2..021fa5b59f01 100644 --- a/content/child/plugin_messages.h +++ b/content/child/plugin_messages.h @@ -192,9 +192,6 @@ IPC_MESSAGE_CONTROL1(PluginMsg_ResetModalDialogEvent, IPC_MESSAGE_ROUTED1(PluginMsg_FetchURL, PluginMsg_FetchURL_Params) -IPC_MESSAGE_CONTROL1(PluginHostMsg_DidAbortLoading, - int /* render_view_id */) - #if defined(OS_WIN) IPC_MESSAGE_ROUTED4(PluginMsg_ImeCompositionUpdated, string16 /* text */, diff --git a/content/plugin/plugin_channel.cc b/content/plugin/plugin_channel.cc index fb2401c11c23..3340ea8df136 100644 --- a/content/plugin/plugin_channel.cc +++ b/content/plugin/plugin_channel.cc @@ -13,7 +13,6 @@ #include "build/build_config.h" #include "content/child/child_process.h" #include "content/child/npapi/plugin_instance.h" -#include "content/child/npapi/webplugin_delegate_impl.h" #include "content/child/plugin_messages.h" #include "content/common/plugin_process_messages.h" #include "content/plugin/plugin_thread.h" @@ -264,7 +263,6 @@ bool PluginChannel::OnControlMessageReceived(const IPC::Message& msg) { OnDestroyInstance) IPC_MESSAGE_HANDLER(PluginMsg_GenerateRouteID, OnGenerateRouteID) IPC_MESSAGE_HANDLER(PluginProcessMsg_ClearSiteData, OnClearSiteData) - IPC_MESSAGE_HANDLER(PluginHostMsg_DidAbortLoading, OnDidAbortLoading) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() DCHECK(handled); @@ -333,13 +331,4 @@ void PluginChannel::OnClearSiteData(const std::string& site, Send(new PluginProcessHostMsg_ClearSiteDataResult(success)); } -void PluginChannel::OnDidAbortLoading(int render_view_id) { - for (size_t i = 0; i < plugin_stubs_.size(); ++i) { - if (plugin_stubs_[i]->webplugin()->host_render_view_routing_id() == - render_view_id) { - plugin_stubs_[i]->delegate()->instance()->CloseStreams(); - } - } -} - } // namespace content diff --git a/content/plugin/plugin_channel.h b/content/plugin/plugin_channel.h index 1fb5df1b52dc..8af63b9e0299 100644 --- a/content/plugin/plugin_channel.h +++ b/content/plugin/plugin_channel.h @@ -81,7 +81,6 @@ class PluginChannel : public NPChannelBase { void OnClearSiteData(const std::string& site, uint64 flags, uint64 max_age); - void OnDidAbortLoading(int render_view_id); std::vector > plugin_stubs_; diff --git a/content/plugin/webplugin_delegate_stub.h b/content/plugin/webplugin_delegate_stub.h index bbae899f0bf9..375fee4bd752 100644 --- a/content/plugin/webplugin_delegate_stub.h +++ b/content/plugin/webplugin_delegate_stub.h @@ -48,7 +48,6 @@ class WebPluginDelegateStub : public IPC::Listener, virtual bool Send(IPC::Message* msg) OVERRIDE; int instance_id() { return instance_id_; } - WebPluginDelegateImpl* delegate() { return delegate_; } WebPluginProxy* webplugin() { return webplugin_; } private: diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index ddc38b586dbf..2cec72d37c39 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -8,7 +8,6 @@ #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" #include "content/child/appcache/appcache_dispatcher.h" -#include "content/child/plugin_messages.h" #include "content/child/quota_dispatcher.h" #include "content/child/request_extra_data.h" #include "content/common/socket_stream_handle_data.h" @@ -23,7 +22,6 @@ #include "content/renderer/browser_plugin/browser_plugin.h" #include "content/renderer/browser_plugin/browser_plugin_manager.h" #include "content/renderer/internal_document_state_data.h" -#include "content/renderer/npapi/plugin_channel_host.h" #include "content/renderer/render_thread_impl.h" #include "content/renderer/render_view_impl.h" #include "content/renderer/renderer_webapplicationcachehost_impl.h" @@ -707,11 +705,6 @@ void RenderFrameImpl::didRunInsecureContent( target)); } -void RenderFrameImpl::didAbortLoading(WebKit::WebFrame* frame) { - PluginChannelHost::Broadcast( - new PluginHostMsg_DidAbortLoading(render_view_->GetRoutingID())); -} - void RenderFrameImpl::didExhaustMemoryAvailableForScript( WebKit::WebFrame* frame) { render_view_->Send(new ViewHostMsg_JSOutOfMemory( diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index dd652ef93d2f..b6940f96e915 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -133,7 +133,6 @@ class CONTENT_EXPORT RenderFrameImpl virtual void didRunInsecureContent(WebKit::WebFrame* frame, const WebKit::WebSecurityOrigin& origin, const WebKit::WebURL& target); - virtual void didAbortLoading(WebKit::WebFrame* frame); virtual void didExhaustMemoryAvailableForScript( WebKit::WebFrame* frame); virtual void didCreateScriptContext(WebKit::WebFrame* frame, -- 2.11.4.GIT