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

Side by Side Diff: printing/print_settings_initializer_gtk.cc

Issue 24989002: Cleanup: Use base namespace in printing/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 2 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
« no previous file with comments | « printing/print_settings_initializer.cc ('k') | printing/printed_document.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_gtk.h" 5 #include "printing/print_settings_initializer_gtk.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/units.h" 13 #include "printing/units.h"
14 14
15 namespace printing { 15 namespace printing {
16 16
17 // static 17 // static
18 void PrintSettingsInitializerGtk::InitPrintSettings( 18 void PrintSettingsInitializerGtk::InitPrintSettings(
19 GtkPrintSettings* settings, 19 GtkPrintSettings* settings,
20 GtkPageSetup* page_setup, 20 GtkPageSetup* page_setup,
21 const PageRanges& new_ranges, 21 const PageRanges& new_ranges,
22 bool print_selection_only, 22 bool print_selection_only,
23 PrintSettings* print_settings) { 23 PrintSettings* print_settings) {
24 DCHECK(settings); 24 DCHECK(settings);
25 DCHECK(page_setup); 25 DCHECK(page_setup);
26 DCHECK(print_settings); 26 DCHECK(print_settings);
27 27
28 string16 name(UTF8ToUTF16(static_cast<const char*>( 28 base::string16 name(base::UTF8ToUTF16(static_cast<const char*>(
29 gtk_print_settings_get_printer(settings)))); 29 gtk_print_settings_get_printer(settings))));
30 print_settings->set_printer_name(name); 30 print_settings->set_printer_name(name);
31 print_settings->set_device_name(print_settings->printer_name()); 31 print_settings->set_device_name(print_settings->printer_name());
32 print_settings->ranges = new_ranges; 32 print_settings->ranges = new_ranges;
33 print_settings->selection_only = print_selection_only; 33 print_settings->selection_only = print_selection_only;
34 34
35 gfx::Size physical_size_device_units; 35 gfx::Size physical_size_device_units;
36 gfx::Rect printable_area_device_units; 36 gfx::Rect printable_area_device_units;
37 int dpi = gtk_print_settings_get_resolution(settings); 37 int dpi = gtk_print_settings_get_resolution(settings);
38 if (dpi) { 38 if (dpi) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 GtkPageOrientation orientation = gtk_print_settings_get_orientation(settings); 75 GtkPageOrientation orientation = gtk_print_settings_get_orientation(settings);
76 print_settings->SetOrientation(orientation == GTK_PAGE_ORIENTATION_LANDSCAPE); 76 print_settings->SetOrientation(orientation == GTK_PAGE_ORIENTATION_LANDSCAPE);
77 } 77 }
78 78
79 const double PrintSettingsInitializerGtk::kTopMarginInInch = 0.25; 79 const double PrintSettingsInitializerGtk::kTopMarginInInch = 0.25;
80 const double PrintSettingsInitializerGtk::kBottomMarginInInch = 0.56; 80 const double PrintSettingsInitializerGtk::kBottomMarginInInch = 0.56;
81 const double PrintSettingsInitializerGtk::kLeftMarginInInch = 0.25; 81 const double PrintSettingsInitializerGtk::kLeftMarginInInch = 0.25;
82 const double PrintSettingsInitializerGtk::kRightMarginInInch = 0.25; 82 const double PrintSettingsInitializerGtk::kRightMarginInInch = 0.25;
83 83
84 } // namespace printing 84 } // namespace printing
OLDNEW
« no previous file with comments | « printing/print_settings_initializer.cc ('k') | printing/printed_document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698