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

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

Issue 8041052: Add IsScalingDisabled and PP_PRINTOUTPUTFORMAT_EMF to pepper printing interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
Index: ppapi/cpp/dev/printing_dev.cc
diff --git a/ppapi/cpp/dev/printing_dev.cc b/ppapi/cpp/dev/printing_dev.cc
index 93055e7cf631122210237141a846a4932474d15f..e483e900c754c92cd563f312d1ecab7ed836948c 100644
--- a/ppapi/cpp/dev/printing_dev.cc
+++ b/ppapi/cpp/dev/printing_dev.cc
@@ -22,6 +22,14 @@ uint32_t QuerySupportedFormats(PP_Instance instance) {
return static_cast<Printing_Dev*>(object)->QuerySupportedPrintOutputFormats();
}
+bool IsScalingDisabled(PP_Instance instance) {
+ void* object =
+ pp::Instance::GetPerInstanceObject(instance, kPPPPrintingInterface);
+ if (!object)
+ return 0;
dmichael (off chromium) 2011/09/27 15:28:38 0->false?
vandebo (ex-Chrome) 2011/09/27 20:02:24 Done.
+ return static_cast<Printing_Dev*>(object)->IsPrintScalingDisabled();
+}
+
int32_t Begin(PP_Instance instance,
const struct PP_PrintSettings_Dev* print_settings) {
void* object =
@@ -51,6 +59,7 @@ void End(PP_Instance instance) {
const PPP_Printing_Dev ppp_printing = {
&QuerySupportedFormats,
+ &IsScalingDisabled,
&Begin,
&PrintPages,
&End

Powered by Google App Engine
This is Rietveld 408576698