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

Side by Side Diff: chrome/browser/printing/printing_gtk_util.cc

Issue 231733005: Delete the GTK+ port of Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remerge to ToT Created 6 years, 8 months 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/printing/printing_gtk_util.h"
6
7 #include <gtk/gtk.h>
8 #include <gtk/gtkunixprint.h>
9
10 #include "base/strings/string16.h"
11 #include "base/strings/utf_string_conversions.h"
12 #include "printing/print_settings.h"
13 #include "printing/printing_context_linux.h"
14 #include "printing/units.h"
15
16 gfx::Size GetPdfPaperSizeDeviceUnitsGtk(
17 printing::PrintingContextLinux* context) {
18 GtkPageSetup* page_setup = gtk_page_setup_new();
19
20 gfx::SizeF paper_size(
21 gtk_page_setup_get_paper_width(page_setup, GTK_UNIT_INCH),
22 gtk_page_setup_get_paper_height(page_setup, GTK_UNIT_INCH));
23
24 g_object_unref(page_setup);
25
26 const printing::PrintSettings& settings = context->settings();
27
28 return gfx::Size(
29 paper_size.width() * settings.device_units_per_inch(),
30 paper_size.height() * settings.device_units_per_inch());
31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698