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

Unified Diff: ppapi/cpp/dev/printing_dev.cc

Issue 375253002: [Chrome] Support NumCopies print preset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
« ppapi/cpp/dev/printing_dev.h ('K') | « ppapi/cpp/dev/printing_dev.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/printing_dev.cc
diff --git a/ppapi/cpp/dev/printing_dev.cc b/ppapi/cpp/dev/printing_dev.cc
index 60154cd0d37f85f58d5e3115322cd56b67c6760d..ff31fde0a1bff43e723511111fc33cab8b2fba1b 100644
--- a/ppapi/cpp/dev/printing_dev.cc
+++ b/ppapi/cpp/dev/printing_dev.cc
@@ -65,13 +65,17 @@ PP_Bool IsScalingDisabled(PP_Instance instance) {
return PP_FromBool(return_value);
}
-const PPP_Printing_Dev ppp_printing = {
- &QuerySupportedFormats,
- &Begin,
- &PrintPages,
- &End,
- &IsScalingDisabled
-};
+int32_t NumCopies(PP_Instance instance) {
+ void* object =
+ pp::Instance::GetPerInstanceObject(instance, kPPPPrintingInterface);
+ if (!object)
+ return 1;
+ return static_cast<Printing_Dev*>(object)->GetNumCopies();
+}
+
+const PPP_Printing_Dev ppp_printing = {&QuerySupportedFormats, &Begin,
+ &PrintPages, &End,
+ &IsScalingDisabled, &NumCopies};
} // namespace
« ppapi/cpp/dev/printing_dev.h ('K') | « ppapi/cpp/dev/printing_dev.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698