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

Unified Diff: pdf/out_of_process_instance.cc

Issue 392813003: PDF changes for BrowserPlugin Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/out_of_process_instance.cc
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index 6a3a5181974977defb78713bc667e9171dd491f1..fd24c122562ca801fecfea12b042116f41867a65 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -85,6 +85,8 @@ const char kJSGetPasswordCompleteType[] = "getPasswordComplete";
const char kJSPassword[] = "password";
// Print (Page -> Plugin)
const char kJSPrintType[] = "print";
+// Save (Page -> Plugin)
+const char kJSSaveType[] = "save";
// Go to page (Plugin -> Page)
const char kJSGoToPageType[] = "goToPage";
const char kJSPageNumber[] = "page";
@@ -375,6 +377,8 @@ void OutOfProcessInstance::HandleMessage(const pp::Var& message) {
}
} else if (type == kJSPrintType) {
Print();
+ } else if (type == kJSSaveType) {
+ pp::PDF::SaveAs(this);
} else if (type == kJSResetPrintPreviewModeType &&
dict.Get(pp::Var(kJSPrintPreviewUrl)).is_string() &&
dict.Get(pp::Var(kJSPrintPreviewGrayscale)).is_bool() &&
« no previous file with comments | « extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698