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

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: Addressed review comments 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..04eb1abf3ab180f5f4d4ea40fdc00cd62fe76eac 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,
+ WebKit::WebPrintSourceSize, printer_dpi);
+}
+
+int WebPluginImpl::printBegin(const WebKit::WebRect& content_area,
+ const WebKit::WebRect& printable_area,
+ const WebKit::WebSize& paper_size,
+ WebKit::WebPrintScalingOption scaling_option,
+ int printer_dpi) {
+ return instance_->PrintBegin(content_area, printable_area, paper_size,
+ scaling_option, printer_dpi);
}
bool WebPluginImpl::printPage(int page_number,
« ppapi/c/dev/ppp_printing_dev.h ('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