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

Side by Side Diff: printing/print_settings_initializer_win.cc

Issue 46623002: Move settings setup for PDF and cloud print into single location in PrintingContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "printing/print_settings_initializer_win.h" 5 #include "printing/print_settings_initializer_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "printing/print_settings.h" 9 #include "printing/print_settings.h"
10 10
(...skipping 30 matching lines...) Expand all
41 GetDeviceCaps(hdc, HORZRES), 41 GetDeviceCaps(hdc, HORZRES),
42 GetDeviceCaps(hdc, VERTRES)); 42 GetDeviceCaps(hdc, VERTRES));
43 43
44 // Sanity check the printable_area: we've seen crashes caused by a printable 44 // Sanity check the printable_area: we've seen crashes caused by a printable
45 // area rect of 0, 0, 0, 0, so it seems some drivers don't set it. 45 // area rect of 0, 0, 0, 0, so it seems some drivers don't set it.
46 if (printable_area_device_units.IsEmpty() || 46 if (printable_area_device_units.IsEmpty() ||
47 !gfx::Rect(physical_size_device_units).Contains( 47 !gfx::Rect(physical_size_device_units).Contains(
48 printable_area_device_units)) { 48 printable_area_device_units)) {
49 printable_area_device_units = gfx::Rect(physical_size_device_units); 49 printable_area_device_units = gfx::Rect(physical_size_device_units);
50 } 50 }
51 51 DCHECK_EQ(print_settings->device_units_per_inch(), dpi);
52 print_settings->SetPrinterPrintableArea(physical_size_device_units, 52 print_settings->SetPrinterPrintableArea(physical_size_device_units,
53 printable_area_device_units, 53 printable_area_device_units,
54 dpi, false); 54 false);
55 } 55 }
56 56
57 } // namespace printing 57 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698