From 4c069962107452fb36c76a3845bb713c0532c606 Mon Sep 17 00:00:00 2001 From: "kerz@chromium.org" Date: Wed, 20 Apr 2011 22:13:37 +0000 Subject: Merge 82253 - Fix M12 release blocker. SaveAs now works for embedded PDFs and PDFs in iframe.BUG=79840TEST=Verify embedded PDFs can save using toolbar (lower-right corner).Review URL: http://codereview.chromium.org/6881055 TBR=gene@chromium.org Review URL: http://codereview.chromium.org/6877097 git-svn-id: svn://svn.chromium.org/chrome/branches/742/src@82369 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/plugins/ppapi/mock_plugin_delegate.cc | 2 +- webkit/plugins/ppapi/mock_plugin_delegate.h | 2 +- webkit/plugins/ppapi/plugin_delegate.h | 4 ++-- webkit/plugins/ppapi/ppb_pdf_impl.cc | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'webkit') diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.cc b/webkit/plugins/ppapi/mock_plugin_delegate.cc index b0185ab..4ac0a00 100644 --- a/webkit/plugins/ppapi/mock_plugin_delegate.cc +++ b/webkit/plugins/ppapi/mock_plugin_delegate.cc @@ -224,7 +224,7 @@ void MockPluginDelegate::SetContentRestriction(int restrictions) { void MockPluginDelegate::HasUnsupportedFeature() { } -void MockPluginDelegate::SaveAs() { +void MockPluginDelegate::SaveURLAs(const GURL& url) { } P2PSocketDispatcher* MockPluginDelegate::GetP2PSocketDispatcher() { diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.h b/webkit/plugins/ppapi/mock_plugin_delegate.h index 98f769f..32b80c7 100644 --- a/webkit/plugins/ppapi/mock_plugin_delegate.h +++ b/webkit/plugins/ppapi/mock_plugin_delegate.h @@ -99,7 +99,7 @@ class MockPluginDelegate : public PluginDelegate { virtual void DidStopLoading(); virtual void SetContentRestriction(int restrictions); virtual void HasUnsupportedFeature(); - virtual void SaveAs(); + virtual void SaveURLAs(const GURL& url); virtual P2PSocketDispatcher* GetP2PSocketDispatcher(); virtual webkit_glue::P2PTransport* CreateP2PTransport(); }; diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h index 212889a..eefb1e6 100644 --- a/webkit/plugins/ppapi/plugin_delegate.h +++ b/webkit/plugins/ppapi/plugin_delegate.h @@ -375,8 +375,8 @@ class PluginDelegate { // Tells the browser that the PDF has an unsupported feature. virtual void HasUnsupportedFeature() = 0; - // Tells the browser to bring up SaveAs dialog. - virtual void SaveAs() = 0; + // Tells the browser to bring up SaveAs dialog to save specified URL. + virtual void SaveURLAs(const GURL& url) = 0; // Socket dispatcher for P2P connections. Returns to NULL if P2P API // is disabled. diff --git a/webkit/plugins/ppapi/ppb_pdf_impl.cc b/webkit/plugins/ppapi/ppb_pdf_impl.cc index 9316e3a..f58b823 100644 --- a/webkit/plugins/ppapi/ppb_pdf_impl.cc +++ b/webkit/plugins/ppapi/ppb_pdf_impl.cc @@ -304,7 +304,7 @@ void SaveAs(PP_Instance instance_id) { PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); if (!instance) return; - instance->delegate()->SaveAs(); + instance->delegate()->SaveURLAs(instance->plugin_url()); } const PPB_PDF ppb_pdf = { -- cgit v1.1