summaryrefslogtreecommitdiffstats
path: root/printing/backend/win_helper.h
Commit message (Collapse)AuthorAgeFilesLines
* scoped_ptr<DEVMODE[]> replaced with scoped_ptr<DEVMODE, base::FreeDeleter>.vitalybuka@chromium.org2014-03-111-5/+6
| | | | | | | | NOTRY=true Review URL: https://codereview.chromium.org/191913002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256087 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 252221 "Use DocumentProperties to get default DEVMODE ins..."vitalybuka@chromium.org2014-02-211-3/+2
| | | | | | | | | | | | | | > Use DocumentProperties to get default DEVMODE instead of PRINTER_INFO_*. > Fixed ScopedPrinterHandle::OpenPrinter interface. > > Review URL: https://codereview.chromium.org/168003002 TBR=vitalybuka@chromium.org BUG=345746 Review URL: https://codereview.chromium.org/175173005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252658 0039d316-1c4b-4281-b951-d872f2087c98
* Use DocumentProperties to get default DEVMODE instead of PRINTER_INFO_*.vitalybuka@chromium.org2014-02-201-2/+3
| | | | | | | | Fixed ScopedPrinterHandle::OpenPrinter interface. Review URL: https://codereview.chromium.org/168003002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252221 0039d316-1c4b-4281-b951-d872f2087c98
* Use XPS to set color for HP printers.vitalybuka@chromium.org2014-02-141-0/+16
| | | | | | | | | | Wrap DocumentProperties into printing::CreateDevMode(). BUG=166587 Review URL: https://codereview.chromium.org/165993002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251408 0039d316-1c4b-4281-b951-d872f2087c98
* Base: Remove Receive() from ScopedHandle.rvargas@chromium.org2013-11-281-6/+3
| | | | | | | | | | | | | | | | | | In general, the OS API contract doesn't guarantee that output variables are not modified on failure, so a Reeceive pattern is fundamentally insecure. BUG=318531 TEST=current tests tbr'ing owners for the consumers. TBR=jvoung@chromium.org, thakis@chromium.org, sergeyu@chromium.org, grt@chromium.org, gene@chromium.org, youngki@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=237459 Review URL: https://codereview.chromium.org/71013004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237675 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of https://codereview.chromium.org/71013004/hashimoto@chromium.org2013-11-271-3/+6
| | | | | | | | | | | | Reason for revert: Causing compile failure in chrome_util.cc on "Google Chrome Win" http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Win/builds/21803 TBR=cpu@chromium.org,jvoung@chromium.org,thakis@chromium.org,sergeyu@chromium.org,grt@chromium.org,gene@chromium.org,youngki@chromium.org,rvargas@chromium.org NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/90963002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237541 0039d316-1c4b-4281-b951-d872f2087c98
* Base: Remove Receive() from ScopedHandle.rvargas@chromium.org2013-11-271-6/+3
| | | | | | | | | | | | | | | | In general, the OS API contract doesn't guarantee that output variables are not modified on failure, so a Reeceive pattern is fundamentally insecure. BUG=318531 TEST=current tests tbr'ing owners for the consumers. TBR=jvoung@chromium.org, thakis@chromium.org, sergeyu@chromium.org, grt@chromium.org, gene@chromium.org, youngki@chromium.org Review URL: https://codereview.chromium.org/71013004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237459 0039d316-1c4b-4281-b951-d872f2087c98
* Extract XPS code from PrintSystemWin.vitalybuka@chromium.org2013-11-101-0/+25
| | | | | | | | BUG=317027 Review URL: https://codereview.chromium.org/61673004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234174 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
* Use a direct include of strings headers in ppapi/, printing/.avi@chromium.org2013-06-111-1/+1
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16366009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205664 0039d316-1c4b-4281-b951-d872f2087c98
* Don't close handles returned by ::OpenPrinter with error.vitalybuka@chromium.org2013-06-111-2/+20
| | | | | | | | BUG=248061 Review URL: https://chromiumcodereview.appspot.com/15798023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205600 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 139885 - Enable the handle verifier.rvargas@google.com2012-06-041-2/+1
| | | | | | | | | | | | | BUG=127931 TEST=none TBR=willchan, wez, abodenha Review URL: https://chromiumcodereview.appspot.com/10441124 TBR=rvargas@google.com Review URL: https://chromiumcodereview.appspot.com/10516004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140417 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 139885 - Enable the handle verifier.rvargas@google.com2012-05-311-1/+2
| | | | | | | | | | | | | BUG=127931 TEST=none TBR=willchan, wez, abodenha Review URL: https://chromiumcodereview.appspot.com/10441124 TBR=rvargas@google.com Review URL: https://chromiumcodereview.appspot.com/10454100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139905 0039d316-1c4b-4281-b951-d872f2087c98
* Enable the handle verifier.rvargas@google.com2012-05-311-2/+1
| | | | | | | | | | BUG=127931 TEST=none TBR=willchan, wez, abodenha Review URL: https://chromiumcodereview.appspot.com/10441124 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139885 0039d316-1c4b-4281-b951-d872f2087c98
* Base: Add a handle verifier to ScopedHandle.rvargas@chromium.org2012-05-311-1/+2
| | | | | | | | | | | | | This provides basic tracking of handles for XP. BUG=127931 TEST=none TBR=abodenha, wez Review URL: https://chromiumcodereview.appspot.com/10453082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139736 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded scoped_ptr.h includes from ppapi, printing, ↵thestig@chromium.org2012-05-161-6/+6
| | | | | | | | | | | | remoting, and sync. BUG=none TEST=none TBR=brettw,hclam,akalin,abodenha Review URL: https://chromiumcodereview.appspot.com/10387107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137376 0039d316-1c4b-4281-b951-d872f2087c98
* Driver related info would be included into PrinterBasicInfo::options so it ↵vitalybuka@chromium.org2012-03-221-0/+10
| | | | | | | | | | | would be uploaded to cloud print backend. BUG=118797 TEST=none Review URL: http://codereview.chromium.org/9812002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128141 0039d316-1c4b-4281-b951-d872f2087c98
* Making GenericScopedHandle capable of handling handle types other than HANDLE.alexeypa@chromium.org2012-03-051-0/+13
| | | | | | Review URL: http://codereview.chromium.org/9582045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124980 0039d316-1c4b-4281-b951-d872f2087c98
* Added ScopedPrinterHandlevitalybuka@chromium.org2012-03-021-1/+12
| | | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/9480026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124640 0039d316-1c4b-4281-b951-d872f2087c98
* Add printing.dll to the component build.darin@chromium.org2011-09-011-4/+5
| | | | | | | R=rvargas,thestig Review URL: http://codereview.chromium.org/7799003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99144 0039d316-1c4b-4281-b951-d872f2087c98
* Added support to the Windows cloud print proxy to print XPS documents ↵sanjeevr@chromium.org2011-02-171-0/+25
| | | | | | | | | | | directly without any conversion (only works on Windows 7). The proxy uses the Accept: header to specify what data types it can accept. BUG=None. TEST=When the cloud print service supports this, submitting an XPS document should go through to the Win 7 proxy without any conversions. Review URL: http://codereview.chromium.org/6523040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75286 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a crash with some HP printer drivers (when invoking ↵sanjeevr@chromium.org2011-01-071-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | PTGetPrintCapabilities on them). Detailed story: Calls to XPS APIs typically require the XPS provider to be opened with PTOpenProvider. PTOpenProvider calls CoInitializeEx with COINIT_MULTITHREADED. We have seen certain buggy HP printer driver DLLs that call CoInitializeEx with COINIT_APARTMENTTHREADED in the context of PTGetPrintCapabilities. This call fails but the printer driver calls CoUninitialize anyway. This results in the apartment being torn down too early and the msxml DLL being unloaded which in turn causes code in unidrvui.dll to have a dangling pointer to an XML document which causes a crash. To protect ourselves from such drivers we make sure we always have an extra CoInitialize (calls to CoInitialize/CoUninitialize are refcounted). BUG=None TEST=Test Cloud Print Proxy on Windows with HP Photosmart 7960 series printers. Review URL: http://codereview.chromium.org/6037019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70754 0039d316-1c4b-4281-b951-d872f2087c98
* Used GetProcAddress to load exported functions from prntvpt.dll instead of ↵sanjeevr@chromium.org2010-11-101-1/+48
| | | | | | | | | | | using DELAYLOAD. BUG=62421 TEST=ui_tests on XP without the XPS Framework installed should run. Review URL: http://codereview.chromium.org/4637004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65678 0039d316-1c4b-4281-b951-d872f2087c98
* Move useful printing backend code from chrome/service/cloud_print to ↵thestig@chromium.org2010-10-251-0/+16
printing/backend. BUG=none TEST=none Review URL: http://codereview.chromium.org/3945003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63772 0039d316-1c4b-4281-b951-d872f2087c98