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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 591053002: Support print preset options for pdf document (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review feedback (comment, initialization) Created 6 years, 2 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: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index f464b41ba01f9a98cd4aaf3d904c86e63d8b911f..0de82ec637a2b38597a53b21780381c9d60b71eb 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -188,6 +188,7 @@
#include "public/web/WebPerformance.h"
#include "public/web/WebPlugin.h"
#include "public/web/WebPrintParams.h"
+#include "public/web/WebPrintPresetOptions.h"
#include "public/web/WebRange.h"
#include "public/web/WebScriptSource.h"
#include "public/web/WebSecurityOrigin.h"
@@ -1304,14 +1305,14 @@ bool WebLocalFrameImpl::isPrintScalingDisabledForPlugin(const WebNode& node)
return pluginContainer->isPrintScalingDisabled();
}
-int WebLocalFrameImpl::getPrintCopiesForPlugin(const WebNode& node)
+bool WebLocalFrameImpl::getPrintPresetOptionsForPlugin(const WebNode& node, WebPrintPresetOptions* presetOptions)
{
WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFromFrame(frame()) : toWebPluginContainerImpl(node.pluginContainer());
if (!pluginContainer || !pluginContainer->supportsPaginatedPrint())
- return 1;
+ return false;
- return pluginContainer->getCopiesToPrint();
+ return pluginContainer->getPrintPresetOptionsFromDocument(presetOptions);
}
bool WebLocalFrameImpl::hasCustomPageSizeStyle(int pageIndex)

Powered by Google App Engine
This is Rietveld 408576698