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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 379793002: [Blink] Support NumCopies print preset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 ba48c3cb59054cfdc24b06f04a1bbe9967519abf..5422e546946edcf020ea9a209fad626c5086fbea 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -1312,6 +1312,16 @@ bool WebLocalFrameImpl::isPrintScalingDisabledForPlugin(const WebNode& node)
return pluginContainer->isPrintScalingDisabled();
}
+int WebLocalFrameImpl::getNumCopiesForPlugin(const WebNode& node)
+{
+ WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFromFrame(frame()) : toWebPluginContainerImpl(node.pluginContainer());
+
+ if (!pluginContainer || !pluginContainer->supportsPaginatedPrint())
+ return false;
Inactive 2014/07/15 15:55:00 You should not return a boolean here...
Nikhil 2014/07/16 13:58:49 Done.
+
+ return pluginContainer->getNumCopies();
+}
+
bool WebLocalFrameImpl::hasCustomPageSizeStyle(int pageIndex)
{
return frame()->document()->styleForPage(pageIndex)->pageSizeType() != PAGE_SIZE_AUTO;

Powered by Google App Engine
This is Rietveld 408576698