summaryrefslogtreecommitdiffstats
path: root/printing/printing_context_no_system_dialog.cc
Commit message (Collapse)AuthorAgeFilesLines
* Switch to standard integer types in printing/.avi2015-12-211-0/+1
| | | | | | | | | BUG=138542 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1544623002 Cr-Commit-Position: refs/heads/master@{#366463}
* Allow page range selection in system dialog called from previewvitalybuka2015-05-051-1/+2
| | | | | | | | | | | Two location for this option could case small confusion. Still some users may prefer to select pages in system dialog. BUG=461843 Review URL: https://codereview.chromium.org/1124433006 Cr-Commit-Position: refs/heads/master@{#328260}
* Implement window.print() on Androiddgn2014-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Essentially wires up the window.print() and the basic printing path to Android framwork's PrintManager. The changes affect the basic printing path using PrintingMessageFilter::OnScriptedPrint. When calling window.print() on Android, it would now be called twice. The first time is directly after the JS call, OnScriptedPrint is called with a parameter telling it that it's being called from JS. It will then end up calling PrintJobWorker::GetSettings, forwarding that information. PrintJobWorker then takes care of calling PrintingController through JNI, joining the same code path used when printing from chrome's menu in android: Android framework's PrintManager is invoked, and it manages the preview, using the tab to generate the output as the user changes his/her preferences. Why so many changes for just that: the window.print() call is blocked until the end of the process by message pumping. It has to be disabled when printing is finished. It is currently done by setting a callback in the current PrintingContext, that will be called when printing is done. PrintingController stores the reference to it, but here we have two queries at the same time, and only the latest PrintingContext would be stored. I added a field to store separately the one coming from the initial call, so that it can be used when printing is done to stop the message pumping. TL;DR: When window.print() is called, the basic printing path is used to forward the query to PrintManager. The PrintManager then uses almost the same path to actually print the document (as previously implemented to power the 'Print...' entry in the menu). The changes are mostly to ensure that JS returns when printing is completed and not before (or never). BUG=437338 Review URL: https://codereview.chromium.org/740983002 Cr-Commit-Position: refs/heads/master@{#308416}
* Use document from preview for System Dialog printing on Windows.vitalybuka2014-08-261-1/+3
| | | | | | | | | | | System dialog shows only properties of selected printers, no system dialog with printers. Removed global Ctrl+Shift+P shortcut on windows. BUG=374321 Review URL: https://codereview.chromium.org/480303002 Cr-Commit-Position: refs/heads/master@{#292032}
* Added PrintingContext::Delegate to get parent view handle and application ↵Vitaly Buka2014-08-261-7/+7
| | | | | | | | | | | | | | locale. BUG=374321 Committed: https://chromium.googlesource.com/chromium/src/+/ee8f4e4029c09ba77e7dbb8fddd85186642b3de8 R=jschuh@chromium.org, noamsml@chromium.org, thestig@chromium.org, yzshen@chromium.org Review URL: https://codereview.chromium.org/478183005 Cr-Commit-Position: refs/heads/master@{#291871}
* Revert of Added PrintingContext::Delegate to get parent view handle and ↵finnur2014-08-251-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | application locale. (patchset #13 of https://codereview.chromium.org/478183005/) Reason for revert: PrintJobTest.SimplePrint leaking on Linux ASAN bots since this was checked in: http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%282%29?numbuilds=100 This CL looks like the likeliest culprit. Original issue's description: > Added PrintingContext::Delegate to get parent view handle and application locale. > > BUG=374321 > > Committed: https://chromium.googlesource.com/chromium/src/+/ee8f4e4029c09ba77e7dbb8fddd85186642b3de8 TBR=noamsml@chromium.org,inferno@chromium.org,yzshen@chromium.org,thestig@chromium.org,jschuh@chromium.org,vitalybuka@chromium.org NOTREECHECKS=true NOTRY=true BUG=374321 Review URL: https://codereview.chromium.org/504763002 Cr-Commit-Position: refs/heads/master@{#291654}
* Added PrintingContext::Delegate to get parent view handle and application ↵vitalybuka2014-08-231-7/+7
| | | | | | | | | | locale. BUG=374321 Review URL: https://codereview.chromium.org/478183005 Cr-Commit-Position: refs/heads/master@{#291584}
* Move settings setup for PDF and cloud print into single location in ↵vitalybuka@chromium.org2013-11-041-24/+19
| | | | | | | | | | | | | PrintingContext. Hard-code CloudPrint printable area until we start to receive this data from server. BUG=305731 NOTRY=true Review URL: https://codereview.chromium.org/46623002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232741 0039d316-1c4b-4281-b951-d872f2087c98
* Revert piece of "De-duplicate job_settings parsing code." r231501vitalybuka@chromium.org2013-11-011-0/+4
| | | | | | | | UseDefaultSettingsis call is not necessary. Review URL: https://codereview.chromium.org/54273002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232371 0039d316-1c4b-4281-b951-d872f2087c98
* De-duplicate job_settings parsing code.vitalybuka@chromium.org2013-10-291-13/+3
| | | | | | | | | | | | | | | Proper set/get methods in PrintSettings. Objective of this re-factoring is to simplify processing of "print_to_pdf || is_cloud_dialog || print_to_cloud" case. Now all platforms for this case do almost the same by in different way: calculate and set printing area. In the next CL I'll move that code into common PrintingContext::UpdatePrintSettings and will ask platform specific implementation for desired page size only. BUG=305731 Review URL: https://codereview.chromium.org/47823002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231501 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Use base namespace in printing/.thestig@chromium.org2013-10-011-1/+1
| | | | | | Review URL: https://codereview.chromium.org/24989002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226174 0039d316-1c4b-4281-b951-d872f2087c98
* Convert most of extensions and some other random stuff to using the base ↵brettw@chromium.org2013-06-211-1/+1
| | | | | | | | | | namespace for Values. R=finnur@chromium.org Review URL: https://codereview.chromium.org/16915006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207937 0039d316-1c4b-4281-b951-d872f2087c98
* Fix issue with some locales simetimes getting the wrong page size.abodenha@chromium.org2012-08-071-1/+1
| | | | | | | | | | | | | | | | | | We use ulocdata_getPaperSize to get the preferred paper size for a region. The error handling for the call assumed that a value other than U_ZERO_ERROR was an error. This is incorrect. The function sometimes returns a warning (negative value). When that happens, the error handling code defaulted to 8.5x11 pages. This CL changes the error handling to no longer treat a warning as an error. BUG=140821 TEST=Set display language to English(UK). Print a web page and choose to save as PDF. Verify that the saved PDF is A4. Review URL: https://chromiumcodereview.appspot.com/10834217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150447 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Convert PrintingContext::PrintSettingsCallback.jhawkins@chromium.org2011-11-191-2/+2
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8549031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110813 0039d316-1c4b-4281-b951-d872f2087c98
* Get printing working in Aura.abodenha@chromium.org2011-11-081-0/+158
Splits printing_context_cairo into gtk and no system dialog versions. No system dialog versions are used in Chrome OS and Aura. BUG=http://code.google.com/p/chromium-os/issues/detail?id=13915 TEST=Build Chrome with Aura. Hit ctrl-p from any web page. Print preview page should come up and should be able to print via Cloud Print. Review URL: http://codereview.chromium.org/8372030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109059 0039d316-1c4b-4281-b951-d872f2087c98