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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebPluginContainerImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 #include "public/web/WebFindOptions.h" 182 #include "public/web/WebFindOptions.h"
183 #include "public/web/WebFormElement.h" 183 #include "public/web/WebFormElement.h"
184 #include "public/web/WebFrameClient.h" 184 #include "public/web/WebFrameClient.h"
185 #include "public/web/WebHistoryItem.h" 185 #include "public/web/WebHistoryItem.h"
186 #include "public/web/WebIconURL.h" 186 #include "public/web/WebIconURL.h"
187 #include "public/web/WebInputElement.h" 187 #include "public/web/WebInputElement.h"
188 #include "public/web/WebNode.h" 188 #include "public/web/WebNode.h"
189 #include "public/web/WebPerformance.h" 189 #include "public/web/WebPerformance.h"
190 #include "public/web/WebPlugin.h" 190 #include "public/web/WebPlugin.h"
191 #include "public/web/WebPrintParams.h" 191 #include "public/web/WebPrintParams.h"
192 #include "public/web/WebPrintPresetOptions.h"
192 #include "public/web/WebRange.h" 193 #include "public/web/WebRange.h"
193 #include "public/web/WebScriptSource.h" 194 #include "public/web/WebScriptSource.h"
194 #include "public/web/WebSecurityOrigin.h" 195 #include "public/web/WebSecurityOrigin.h"
195 #include "public/web/WebSerializedScriptValue.h" 196 #include "public/web/WebSerializedScriptValue.h"
196 #include "web/AssociatedURLLoader.h" 197 #include "web/AssociatedURLLoader.h"
197 #include "web/CompositionUnderlineVectorBuilder.h" 198 #include "web/CompositionUnderlineVectorBuilder.h"
198 #include "web/FindInPageCoordinates.h" 199 #include "web/FindInPageCoordinates.h"
199 #include "web/GeolocationClientProxy.h" 200 #include "web/GeolocationClientProxy.h"
200 #include "web/LocalFileSystemClient.h" 201 #include "web/LocalFileSystemClient.h"
201 #include "web/MIDIClientProxy.h" 202 #include "web/MIDIClientProxy.h"
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 bool WebLocalFrameImpl::isPrintScalingDisabledForPlugin(const WebNode& node) 1335 bool WebLocalFrameImpl::isPrintScalingDisabledForPlugin(const WebNode& node)
1335 { 1336 {
1336 WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFr omFrame(frame()) : toWebPluginContainerImpl(node.pluginContainer()); 1337 WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFr omFrame(frame()) : toWebPluginContainerImpl(node.pluginContainer());
1337 1338
1338 if (!pluginContainer || !pluginContainer->supportsPaginatedPrint()) 1339 if (!pluginContainer || !pluginContainer->supportsPaginatedPrint())
1339 return false; 1340 return false;
1340 1341
1341 return pluginContainer->isPrintScalingDisabled(); 1342 return pluginContainer->isPrintScalingDisabled();
1342 } 1343 }
1343 1344
1344 int WebLocalFrameImpl::getPrintCopiesForPlugin(const WebNode& node) 1345 bool WebLocalFrameImpl::getPrintPresetOptionsForPlugin(const WebNode& node, WebP rintPresetOptions* presetOptions)
1345 { 1346 {
1346 WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFro mFrame(frame()) : toWebPluginContainerImpl(node.pluginContainer()); 1347 WebPluginContainerImpl* pluginContainer = node.isNull() ? pluginContainerFro mFrame(frame()) : toWebPluginContainerImpl(node.pluginContainer());
1347 1348
1348 if (!pluginContainer || !pluginContainer->supportsPaginatedPrint()) 1349 if (!pluginContainer || !pluginContainer->supportsPaginatedPrint())
1349 return 1; 1350 return false;
1350 1351
1351 return pluginContainer->getCopiesToPrint(); 1352 return pluginContainer->getPrintPresetOptionsFromDocument(presetOptions);
1352 } 1353 }
1353 1354
1354 bool WebLocalFrameImpl::hasCustomPageSizeStyle(int pageIndex) 1355 bool WebLocalFrameImpl::hasCustomPageSizeStyle(int pageIndex)
1355 { 1356 {
1356 return frame()->document()->styleForPage(pageIndex)->pageSizeType() != PAGE_ SIZE_AUTO; 1357 return frame()->document()->styleForPage(pageIndex)->pageSizeType() != PAGE_ SIZE_AUTO;
1357 } 1358 }
1358 1359
1359 bool WebLocalFrameImpl::isPageBoxVisible(int pageIndex) 1360 bool WebLocalFrameImpl::isPageBoxVisible(int pageIndex)
1360 { 1361 {
1361 return frame()->document()->isPageBoxVisible(pageIndex); 1362 return frame()->document()->isPageBoxVisible(pageIndex);
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 1973
1973 void WebLocalFrameImpl::invalidateAll() const 1974 void WebLocalFrameImpl::invalidateAll() const
1974 { 1975 {
1975 ASSERT(frame() && frame()->view()); 1976 ASSERT(frame() && frame()->view());
1976 FrameView* view = frame()->view(); 1977 FrameView* view = frame()->view();
1977 view->invalidateRect(view->frameRect()); 1978 view->invalidateRect(view->frameRect());
1978 invalidateScrollbar(); 1979 invalidateScrollbar();
1979 } 1980 }
1980 1981
1981 } // namespace blink 1982 } // namespace blink
OLDNEW
« 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