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

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: Review feedback (update method name) 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/api/dev/ppp_printing_dev.idl ('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..4d53c2afee9582da900d9831ffafa5f7f6d67386 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);
}
+int32_t GetCopiesToPrint(PP_Instance instance) {
+ void* object =
+ pp::Instance::GetPerInstanceObject(instance, kPPPPrintingInterface);
+ if (!object)
+ return 1;
+ return static_cast<Printing_Dev*>(object)->GetCopiesToPrint();
+}
+
const PPP_Printing_Dev ppp_printing = {
- &QuerySupportedFormats,
- &Begin,
- &PrintPages,
- &End,
- &IsScalingDisabled
-};
+ &QuerySupportedFormats, &Begin, &PrintPages,
+ &End, &IsScalingDisabled, &GetCopiesToPrint};
} // namespace
« ppapi/api/dev/ppp_printing_dev.idl ('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