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

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: Rebase Created 6 years, 1 month 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
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebPluginContainerImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 29d679cea19eb70f711694adc53d8f81f36d86bd..0ec32fb473ab8575c5086aab1f3a71f55ff2f6d6 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -189,6 +189,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"
@@ -1341,14 +1342,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)
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebPluginContainerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698