Index: components/pdf/renderer/pepper_pdf_host.cc |
diff --git a/components/pdf/renderer/pepper_pdf_host.cc b/components/pdf/renderer/pepper_pdf_host.cc |
index 301e56f73d4ba282db7300a26dcb197d914119ec..cde2ead26ff4ead1b751765a9f95dd683785b9b6 100644 |
--- a/components/pdf/renderer/pepper_pdf_host.cc |
+++ b/components/pdf/renderer/pepper_pdf_host.cc |
@@ -59,7 +59,7 @@ int32_t PepperPDFHost::OnResourceMessageReceived( |
PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_PDF_HasUnsupportedFeature, |
OnHostMsgHasUnsupportedFeature) |
PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_PDF_Print, OnHostMsgPrint) |
- PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_PDF_SaveAs, |
+ PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_PDF_SaveAs, |
OnHostMsgSaveAs) |
PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_PDF_GetResourceImage, |
OnHostMsgGetResourceImage) |
@@ -142,12 +142,19 @@ int32_t PepperPDFHost::OnHostMsgPrint( |
} |
int32_t PepperPDFHost::OnHostMsgSaveAs( |
- ppapi::host::HostMessageContext* context) { |
+ ppapi::host::HostMessageContext* context, |
+ const std::string& stream_original_url) { |
+ printf("PepperPDFHost::OnHostMsgSaveAs\n"); |
content::PepperPluginInstance* instance = |
host_->GetPluginInstance(pp_instance()); |
if (!instance) |
return PP_ERROR_FAILED; |
GURL url = instance->GetPluginURL(); |
+ printf("url in renderer/ %s\n", url.possibly_invalid_spec().c_str()); |
+ printf("url.is_valid() = %d\n", url.is_valid()); |
+ printf("stream_original_url renderer/: %s\n", stream_original_url.c_str()); |
+ if (!url.is_valid() && !stream_original_url.empty()) |
+ url = GURL(stream_original_url); |
content::RenderView* render_view = instance->GetRenderView(); |
blink::WebLocalFrame* frame = |
render_view->GetWebView()->mainFrame()->toWebLocalFrame(); |