Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5190)

Unified Diff: components/pdf/renderer/pepper_pdf_host.cc

Issue 554893002: [WORK_IN_PROGRESS] PDF::Save() fix for out-of-process-pdf. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better fix for constrained windows Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/pdf/renderer/pepper_pdf_host.h ('k') | components/pdf/renderer/ppb_pdf_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « components/pdf/renderer/pepper_pdf_host.h ('k') | components/pdf/renderer/ppb_pdf_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698