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

Side by Side Diff: chrome/browser/ui/libgtkui/printing_gtk2_util.cc

Issue 2449243002: Gtk3 ui: Add libgtk3ui as a separate build component (Closed)
Patch Set: Add theme_properties dep to //chrome/browser/ui Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/libgtk2ui/printing_gtk2_util.h" 5 #include "chrome/browser/ui/libgtkui/printing_gtk2_util.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 #include <gtk/gtkunixprint.h> 8 #include <gtk/gtkunixprint.h>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "printing/print_settings.h" 12 #include "printing/print_settings.h"
13 #include "printing/printing_context_linux.h" 13 #include "printing/printing_context_linux.h"
14 #include "printing/units.h" 14 #include "printing/units.h"
15 #include "ui/gfx/geometry/size.h" 15 #include "ui/gfx/geometry/size.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Thus this is only useful in print preview mode, where we manually set the 90 // Thus this is only useful in print preview mode, where we manually set the
91 // orientation and change the paper size ourselves. 91 // orientation and change the paper size ourselves.
92 GtkPageOrientation orientation = gtk_print_settings_get_orientation(settings); 92 GtkPageOrientation orientation = gtk_print_settings_get_orientation(settings);
93 // Set before SetPrinterPrintableArea to make it flip area if necessary. 93 // Set before SetPrinterPrintableArea to make it flip area if necessary.
94 print_settings->SetOrientation(orientation == GTK_PAGE_ORIENTATION_LANDSCAPE); 94 print_settings->SetOrientation(orientation == GTK_PAGE_ORIENTATION_LANDSCAPE);
95 DCHECK_EQ(print_settings->device_units_per_inch(), dpi); 95 DCHECK_EQ(print_settings->device_units_per_inch(), dpi);
96 print_settings->SetPrinterPrintableArea(physical_size_device_units, 96 print_settings->SetPrinterPrintableArea(physical_size_device_units,
97 printable_area_device_units, 97 printable_area_device_units,
98 true); 98 true);
99 } 99 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtkui/printing_gtk2_util.h ('k') | chrome/browser/ui/libgtkui/select_file_dialog_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698