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

Unified Diff: ppapi/proxy/printing_resource.cc

Issue 375253002: [Chrome] Support NumCopies print preset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PPB_Printing_Dev changes Created 6 years, 4 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
Index: ppapi/proxy/printing_resource.cc
diff --git a/ppapi/proxy/printing_resource.cc b/ppapi/proxy/printing_resource.cc
index d9be3b7430194e8866d401f3e5f093ce1b23b67d..4442c450ba53392598f5c12fde60eadd9ffc9e19 100644
--- a/ppapi/proxy/printing_resource.cc
+++ b/ppapi/proxy/printing_resource.cc
@@ -41,6 +41,16 @@ int32_t PrintingResource::GetDefaultPrintSettings(
return PP_OK_COMPLETIONPENDING;
}
+void PrintingResource::SetPrintPresetOptionsFromDocument(
+ PP_PrintPresetOptions_Dev* print_options) {
+ if (!sent_create_to_browser())
+ SendCreate(RENDERER, PpapiHostMsg_PrintHost_Create());
+
+ Post(RENDERER,
+ PpapiHostMsg_PrintHost_SetPrintPresetOptionsFromDocument(
Vitaly Buka (NO REVIEWS) 2014/09/03 21:36:24 why do you use Post here and not Call<> as above?
Nikhil 2014/09/04 11:42:53 Call<> expects a response and a callback should be
+ *print_options));
+}
+
void PrintingResource::OnPluginMsgGetDefaultPrintSettingsReply(
PP_PrintSettings_Dev* settings_out,
scoped_refptr<TrackedCallback> callback,

Powered by Google App Engine
This is Rietveld 408576698