| 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..f15099c86f2dd551ef60dd739115e80306807674 100644
|
| --- a/pdf/out_of_process_instance.cc
|
| +++ b/pdf/out_of_process_instance.cc
|
| @@ -85,6 +85,9 @@ const char kJSGetPasswordCompleteType[] = "getPasswordComplete";
|
| const char kJSPassword[] = "password";
|
| // Print (Page -> Plugin)
|
| const char kJSPrintType[] = "print";
|
| +// Save (Page -> Plugin)
|
| +const char kJSSaveType[] = "save";
|
| +const char kJSSaveURL[] = "saveurl";
|
| // Go to page (Plugin -> Page)
|
| const char kJSGoToPageType[] = "goToPage";
|
| const char kJSPageNumber[] = "page";
|
| @@ -375,6 +378,16 @@ void OutOfProcessInstance::HandleMessage(const pp::Var& message) {
|
| }
|
| } else if (type == kJSPrintType) {
|
| Print();
|
| + } else if (type == kJSSaveType) {
|
| + printf("type == kJSSaveType\n");
|
| + if (!dict.Get(pp::Var(kJSSaveURL)).is_string()) {
|
| + printf("saveurl was not string\n");
|
| + } else {
|
| + printf("saveurl WAS string\n");
|
| + printf("Got url here: %s\n", dict.Get(pp::Var(kJSSaveURL)).AsString().c_str());
|
| + }
|
| + printf("url_: %s\n", url_.c_str());
|
| + pp::PDF::SaveAs(this, url_);
|
| } else if (type == kJSResetPrintPreviewModeType &&
|
| dict.Get(pp::Var(kJSPrintPreviewUrl)).is_string() &&
|
| dict.Get(pp::Var(kJSPrintPreviewGrayscale)).is_bool() &&
|
|
|