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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/browser_ppp_printing.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: Address comments 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/native_client/src/shared/ppapi_proxy/browser_ppp_printing.cc
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp_printing.cc b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp_printing.cc
index 075529afb139341fc305c801226fe152b824ef57..e9bac0161a3c7bfd5f9e5652c892ad9d393523f6 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp_printing.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp_printing.cc
@@ -52,7 +52,7 @@ int32_t Begin(PP_Instance instance,
const_cast<PP_PrintSettings_Dev*>(print_settings)),
&pages_required);
- DebugPrintf("PPP_Printing_Dev::QuerySupportedFormats: %s\n",
+ DebugPrintf("PPP_Printing_Dev::Begin: %s\n",
NaClSrpcErrorString(srpc_result));
return pages_required;
}
@@ -74,7 +74,7 @@ PP_Resource PrintPages(PP_Instance instance,
page_range_count,
&image_data);
- DebugPrintf("PPP_Printing_Dev::QuerySupportedFormats: %s\n",
+ DebugPrintf("PPP_Printing_Dev::PrintPages: %s\n",
NaClSrpcErrorString(srpc_result));
return image_data;
}
@@ -89,6 +89,22 @@ void End(PP_Instance instance) {
DebugPrintf("PPP_Printing_Dev::End: %s\n", NaClSrpcErrorString(srpc_result));
}
+PP_Bool IsScalingDisabled(PP_Instance instance) {
+ DebugPrintf("PPP_Printing_Dev::IsScalingDisabled: "
+ "instance=%"NACL_PRIu32"\n", instance);
+
+ int32_t scaling_disabled = 0;
+ NaClSrpcError srpc_result =
+ PppPrintingRpcClient::PPP_Printing_IsScalingDisabled(
+ GetMainSrpcChannel(instance),
+ instance,
+ &scaling_disabled);
+
+ DebugPrintf("PPP_Printing_Dev::IsScalingDisabled: %s\n",
+ NaClSrpcErrorString(srpc_result));
+ return scaling_disabled ? PP_TRUE : PP_FALSE;
+}
+
} // namespace
const PPP_Printing_Dev* BrowserPrinting::GetInterface() {
@@ -96,7 +112,8 @@ const PPP_Printing_Dev* BrowserPrinting::GetInterface() {
QuerySupportedFormats,
Begin,
PrintPages,
- End
+ End,
+ IsScalingDisabled
};
return &printing_interface;
}
« no previous file with comments | « ppapi/example/example.cc ('k') | ppapi/native_client/src/shared/ppapi_proxy/plugin_ppp_printing_rpc_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698