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

Unified Diff: webkit/plugins/ppapi/ppapi_webplugin_impl.cc

Issue 10083059: [Print Preview] Modified PP_PrintSettings_Dev interface to support auto fit to page functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename WebPrintScalingOptions to WebPrintScalingOption. Created 8 years, 8 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: webkit/plugins/ppapi/ppapi_webplugin_impl.cc
diff --git a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
index fb0166217f54a830cb8e15b846286d0fc8b7e641..ed5b2350906baa8ebfedb599589a767b682d85be 100644
--- a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
+++ b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
@@ -18,6 +18,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "webkit/plugins/ppapi/message_channel.h"
#include "webkit/plugins/ppapi/npobject_var.h"
@@ -31,6 +32,7 @@ using WebKit::WebPluginContainer;
using WebKit::WebPluginParams;
using WebKit::WebPoint;
using WebKit::WebRect;
+using WebKit::WebSize;
using WebKit::WebString;
using WebKit::WebURL;
using WebKit::WebVector;
@@ -249,9 +251,23 @@ bool WebPluginImpl::isPrintScalingDisabled() {
return instance_->IsPrintScalingDisabled();
}
-int WebPluginImpl::printBegin(const WebKit::WebRect& printable_area,
+// TODO(kmadhusu): This is a temporary interface to avoid the compile errors.
+// Remove this function after fixing crbug.com/85132.
+int WebPluginImpl::printBegin(const WebKit::WebRect& content_area,
int printer_dpi) {
- return instance_->PrintBegin(printable_area, printer_dpi);
+ WebKit::WebRect printable_area(content_area);
+ WebKit::WebSize paper_size(content_area.width, content_area.height);
+ return instance_->PrintBegin(content_area, printable_area, paper_size,
+ 2, printer_dpi);
kmadhusu 2012/04/20 22:29:57 dmichael: Can I include ppapi/c/dev/ppp_printing_d
dmichael (off chromium) 2012/04/20 23:01:45 You could, but shouldn't it be the WebKit value at
kmadhusu 2012/04/23 16:39:30 Yeah it is a WebKit value. Since I had 'int' data
+}
+
+int WebPluginImpl::printBegin(const WebKit::WebRect& content_area,
+ const WebKit::WebRect& printable_area,
+ const WebKit::WebSize& paper_size,
+ int print_scaling_option,
dmichael (off chromium) 2012/04/20 23:01:45 Is this the typical way of making these 2-sided ch
kmadhusu 2012/04/23 16:39:30 If we are going to create a new function and the
dmichael (off chromium) 2012/04/23 17:02:40 Right... I think you could land the WebKit side f
+ int printer_dpi) {
+ return instance_->PrintBegin(content_area, printable_area, paper_size,
+ print_scaling_option, printer_dpi);
}
bool WebPluginImpl::printPage(int page_number,
« webkit/plugins/ppapi/ppapi_plugin_instance.cc ('K') | « webkit/plugins/ppapi/ppapi_webplugin_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698