summaryrefslogtreecommitdiffstats
path: root/printing/emf_win.h
Commit message (Collapse)AuthorAgeFilesLines
* Add OVERRIDE to printing/.avi@chromium.org2011-11-161-15/+17
| | | | | | | | | BUG=104314 TEST=no change Review URL: http://codereview.chromium.org/8468031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110317 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded forward declarations in printing, sandbox, and skia.thestig@chromium.org2011-11-141-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/8538001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109961 0039d316-1c4b-4281-b951-d872f2087c98
* Add printing.dll to the component build.darin@chromium.org2011-09-011-3/+3
| | | | | | | 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
* PrintPreview: Remove |page_number| from StartPageForVectorCanvas function ↵kmadhusu@chromium.org2011-08-021-2/+2
| | | | | | | | | | | | | and |page_slot| from PrintMsg_PrintPage_Params. We will not add preview pages to the complete metafile in out of order fashion. BUG=none TEST=print preview works after code changes. Review URL: http://codereview.chromium.org/7549001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95092 0039d316-1c4b-4281-b951-d872f2087c98
* Make Metafile::StartPageForVectorCanvas take the page number as an argument.vandebo@chromium.org2011-07-231-2/+2
| | | | | | | | | | | | | This will let us add pages to a metafile out of order for print preview. Also, make PdfMetafileSkia::GetMetafileForCurrentPage use draft mode, now that it's available. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7481019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93763 0039d316-1c4b-4281-b951-d872f2087c98
* Print Preview: Remove unused draft mode code.thestig@chromium.org2011-06-291-2/+0
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7275030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90919 0039d316-1c4b-4281-b951-d872f2087c98
* Print preview should use draft PDFs until it is ready to print to improve speed.kmadhusu@chromium.org2011-06-151-0/+2
| | | | | | | | | BUG=85767 TEST=none Review URL: http://codereview.chromium.org/7149020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89198 0039d316-1c4b-4281-b951-d872f2087c98
* This change implements a first pass in the effort to remove the dependency ↵twiz@chromium.org2011-05-261-1/+1
| | | | | | | | | | | | | | of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86625 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=86625 Review URL: http://codereview.chromium.org/7019013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86823 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 86625 - This change implements a first pass in the effort to remove ↵vandebo@chromium.org2011-05-251-1/+1
| | | | | | | | | | | | | | | the dependency of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7019013 TBR=twiz@chromium.org Review URL: http://codereview.chromium.org/6987019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86629 0039d316-1c4b-4281-b951-d872f2087c98
* This change implements a first pass in the effort to remove the dependency ↵twiz@chromium.org2011-05-251-1/+1
| | | | | | | | | | | | of PlatformDevice within Chrome. The Skia library now provides multiple back-ends for the SkDevice class, so PlatformDevice's inheritance of SkDevice, and the assumption of instances of PlatformDevice limits the use of these new back-ends. A new set of helper functions is provided for the PlatformDevice entry points. Upon construction of a PlatformDevice, a pointer to the interface is cached in the parent SkDevice's SkMetaData. The new helper functions forward calls to the interface cached in the metadata. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7019013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86625 0039d316-1c4b-4281-b951-d872f2087c98
* Fix print preview clipping issues due to scaling.ctguil@chromium.org2011-04-301-4/+4
| | | | | | | | BUG=79941 TEST=none Review URL: http://codereview.chromium.org/6879098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83657 0039d316-1c4b-4281-b951-d872f2087c98
* Fix scaling issue in windows print preview.ctguil@chromium.org2011-04-201-2/+2
| | | | | | | | | | | * Use the full page size for pdf print preview. * Scale device by the webkit page shrink for pdf preview. BUG=79518 TEST=none Review URL: http://codereview.chromium.org/6871038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82259 0039d316-1c4b-4281-b951-d872f2087c98
* Connect the right metafiles for print preview on Linux and Windows.vandebo@chromium.org2011-04-111-3/+3
| | | | | | | | | | | | | | + Remove the NativeMetafileFactory since we can't just use preview flag. + Update each Metafile constructor site to use PreviewMetafile or NativeMetafileImpl. + Fix misc. problems blocking pdf generation on Windows. + Rename the metafile interface. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6826027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81161 0039d316-1c4b-4281-b951-d872f2087c98
* Added a DCHECK to validate the metafile page count while handling alpha ↵kmadhusu@chromium.org2011-04-011-2/+3
| | | | | | | | | | | | | blend transparency. Added a member variable |page_count_| in emf_win.h to track the pages count. BUG=none TEST=windows printing works after code changes. Review URL: http://codereview.chromium.org/6790002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80167 0039d316-1c4b-4281-b951-d872f2087c98
* Removing GetData helper from NativeMetafile interface and also renaming it ↵dpapad@chromium.org2011-03-241-2/+7
| | | | | | | | | | | | | to GetDataAsVector to avoid overloading. Also making it private since it is only used internally. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6713081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79343 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup NativeMetafile (win) interface and EMF class.vandebo@chromium.org2011-03-221-18/+11
| | | | | | | | | | | | | | | | | - Rename CreateDc to Init() and remove unused argument (all non-test calls were CreateDc(NULL, NULL). [This matches cross platform interface.] - Remove CreateFileBackedDc from the NativeMetafile interface and make InitToFile() in the EMF class. - Remove CreateFromFile from the NativeMetafile interface and make it InitFromFile() in the EMF class. - Move the CloseEmf method into the destructor, making the Emf class a use once class (matches actual use). BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78666 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78669 Review URL: http://codereview.chromium.org/6695013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78969 0039d316-1c4b-4281-b951-d872f2087c98
* Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-211-0/+3
| | | | | | | | | | | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78662 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78663 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78812 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78815 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78859 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78860 Review URL: http://codereview.chromium.org/6665046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78935 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 78859 - Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-211-3/+0
| | | | | | | | | | | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78662 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78663 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78812 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78815 Review URL: http://codereview.chromium.org/6665046 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/6711067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78860 0039d316-1c4b-4281-b951-d872f2087c98
* Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-211-0/+3
| | | | | | | | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78662 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78663 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78812 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78815 Review URL: http://codereview.chromium.org/6665046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78859 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 78812 - Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-191-3/+0
| | | | | | | | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78662 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78663 Review URL: http://codereview.chromium.org/6665046 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/6708046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78815 0039d316-1c4b-4281-b951-d872f2087c98
* Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-191-0/+3
| | | | | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78662 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=78663 Review URL: http://codereview.chromium.org/6665046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78812 0039d316-1c4b-4281-b951-d872f2087c98
* Renaming NativeMetafile related methods to more appropriate names.dpapad@chromium.org2011-03-191-1/+1
| | | | | | | | | | | | 1) Renaming Close() to FinishDocument() 2) Renaming NativeMetafileFactory::CreateMetafile() to Create(), since the name of the class already implies what is being created BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6674037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78788 0039d316-1c4b-4281-b951-d872f2087c98
* Unifying StartPage across all platformsdpapad@chromium.org2011-03-181-1/+9
| | | | | | | | | | | Since there is already a getter method for retrieving the context, there is no reason for StartPage to return it. Also the parameter list can be uniform across all platforms. Some arguments are unused in order to achieve this. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6667069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78717 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 78666 - Cleanup NativeMetafile (win) interface and EMF class.vandebo@chromium.org2011-03-181-11/+18
| | | | | | | | | | | | | | | | | - Rename CreateDc to Init() and remove unused argument (all non-test calls were CreateDc(NULL, NULL). [This matches cross platform interface.] - Remove CreateFileBackedDc from the NativeMetafile interface and make InitToFile() in the EMF class. - Remove CreateFromFile from the NativeMetafile interface and make it InitFromFile() in the EMF class. - Move the CloseEmf method into the destructor, making the Emf class a use once class (matches actual use). BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6695013 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/6712030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78669 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup NativeMetafile (win) interface and EMF class.vandebo@chromium.org2011-03-181-18/+11
| | | | | | | | | | | | | | - Rename CreateDc to Init() and remove unused argument (all non-test calls were CreateDc(NULL, NULL). [This matches cross platform interface.] - Remove CreateFileBackedDc from the NativeMetafile interface and make InitToFile() in the EMF class. - Remove CreateFromFile from the NativeMetafile interface and make it InitFromFile() in the EMF class. - Move the CloseEmf method into the destructor, making the Emf class a use once class (matches actual use). BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6695013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78666 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 78662 - Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-181-4/+0
| | | | | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6665046 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/6713029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78663 0039d316-1c4b-4281-b951-d872f2087c98
* Unfork VectorPlatformCanvas.vandebo@chromium.org2011-03-181-0/+4
| | | | | | | | | | | Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices). BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6665046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78662 0039d316-1c4b-4281-b951-d872f2087c98
* Stop overloading Init() in NativeMetafile.vandebo@chromium.org2011-03-171-1/+1
| | | | | | | | | BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6709009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78625 0039d316-1c4b-4281-b951-d872f2087c98
* Unifying NativeMetafile class interface (as much as possible) for Linux, ↵dpapad@chromium.org2011-03-161-60/+28
| | | | | | | | | | | Mac, Win BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6611032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78320 0039d316-1c4b-4281-b951-d872f2087c98
* Applying factory pattern (through NativeMetafileFactory class). It is used ↵dpapad@chromium.org2011-03-021-21/+33
| | | | | | | | | | | | | | | to retrieve different printing contexts (based on the platform and user preferences). BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=76553 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=76555 Review URL: http://codereview.chromium.org/6544028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76581 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 76553 - Applying factory pattern (through NativeMetafileFactory ↵jam@chromium.org2011-03-021-33/+21
| | | | | | | | | | | | | | class). It is used to retrieve different printing contexts (based on the platform and user preferences). BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6544028 TBR=dpapad@chromium.org Review URL: http://codereview.chromium.org/6594121 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76555 0039d316-1c4b-4281-b951-d872f2087c98
* Applying factory pattern (through NativeMetafileFactory class). It is used ↵dpapad@chromium.org2011-03-021-21/+33
| | | | | | | | | | | to retrieve different printing contexts (based on the platform and user preferences). BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6544028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76553 0039d316-1c4b-4281-b951-d872f2087c98
* Printing: Standardize on Metafile::Init, removing Emf::CreateFromData in thejhawkins@chromium.org2010-10-071-3/+3
| | | | | | | | | | | process and any ifdefs needed for this. BUG=none TEST=none Review URL: http://codereview.chromium.org/3595016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61834 0039d316-1c4b-4281-b951-d872f2087c98
* Added methods to create and read from file-backed metafiles to the Windows ↵sanjeevr@chromium.org2010-09-291-0/+8
| | | | | | | | | | | Emf class. BUG=None TEST=Unittests Review URL: http://codereview.chromium.org/3538003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60994 0039d316-1c4b-4281-b951-d872f2087c98
* Removing emf record constructor that is not used.finnur@chromium.org2010-08-311-3/+1
| | | | | | | | | | BUG=None TEST=None CID=5008 Review URL: http://codereview.chromium.org/3106005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57997 0039d316-1c4b-4281-b951-d872f2087c98
* Added StartPage and EndPage methods to the Emf class because the GDI ↵sanjeevr@chromium.org2010-07-121-0/+6
| | | | | | | | | | | StartPage and EndPage APIs do not work in a metafile DC. We write custom GDICOMMENT records to designate a StartPage and EndPage. BUG=None TEST=Unit-tests provided. Review URL: http://codereview.chromium.org/2947006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52084 0039d316-1c4b-4281-b951-d872f2087c98
* Make SharedMemory use uint32 instead of size_t. This removes the remaining ↵jam@chromium.org2010-02-161-3/+3
| | | | | | | | size_t's from the IPC code. Review URL: http://codereview.chromium.org/581001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39164 0039d316-1c4b-4281-b951-d872f2087c98
* printing: replace the deprecated macro (DISALLOW_EVIL_CONSTRUCTORS).maruel@chromium.org2009-12-081-2/+2
| | | | | | | | | | Use DISALLOW_COPY_AND_ASSIGN instead. Patch contributed by Thiago Farina Review URL: http://codereview.chromium.org/460087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34030 0039d316-1c4b-4281-b951-d872f2087c98
* Move printing related stuff to the root printing project from the browser ↵sverrir@google.com2009-07-071-3/+3
| | | | | | | | | | | | | | project. This simplifies further refactoring and eases understanding of the printing part of Chrome. Also renamed win_printing_context to printing_context_win (correct naming convention) and added stub implementations for _linux and mac. Now all but one file is compiling on all platforms. TEST=none (no functional change). BUG=none Review URL: http://codereview.chromium.org/149212 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20086 0039d316-1c4b-4281-b951-d872f2087c98
* Move Emf class to the printing library. Also creates a platform agnostic ↵sverrir@google.com2009-07-061-0/+181
NativeMetafile definition to ease platform porting. BUG=none TEST=none (No functional change) Review URL: http://codereview.chromium.org/149181 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19943 0039d316-1c4b-4281-b951-d872f2087c98