Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef PRINTING_PRINT_SETTINGS_INITIALIZER_GTK_H_ | 5 #ifndef PRINTING_PRINT_SETTINGS_INITIALIZER_GTK_H_ |
| 6 #define PRINTING_PRINT_SETTINGS_INITIALIZER_GTK_H_ | 6 #define PRINTING_PRINT_SETTINGS_INITIALIZER_GTK_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "printing/page_range.h" | 9 #include "printing/page_range.h" |
| 10 | 10 |
| 11 typedef struct _GtkPrintSettings GtkPrintSettings; | 11 typedef struct _GtkPrintSettings GtkPrintSettings; |
| 12 typedef struct _GtkPageSetup GtkPageSetup; | 12 typedef struct _GtkPageSetup GtkPageSetup; |
| 13 | 13 |
| 14 namespace base { | |
| 15 class DictionaryValue; | |
| 16 } | |
| 17 using base::DictionaryValue; | |
|
kmadhusu
2011/08/12 17:21:32
nit: Add a blank line before this.
Aayush Kumar
2011/08/12 18:53:42
Done.
| |
| 18 | |
| 14 namespace printing { | 19 namespace printing { |
| 15 | 20 |
| 16 class PrintSettings; | 21 class PrintSettings; |
| 17 | 22 |
| 18 // Initializes a PrintSettings object from the provided Gtk printer objects. | 23 // Initializes a PrintSettings object from the provided Gtk printer objects. |
| 19 class PrintSettingsInitializerGtk { | 24 class PrintSettingsInitializerGtk { |
| 20 public: | 25 public: |
| 21 static void InitPrintSettings(GtkPrintSettings* settings, | 26 static void InitPrintSettings(GtkPrintSettings* settings, |
| 22 GtkPageSetup* page_setup, | 27 GtkPageSetup* page_setup, |
| 23 const PageRanges& new_ranges, | 28 const PageRanges& new_ranges, |
| 24 bool print_selection_only, | 29 bool print_selection_only, |
| 30 const DictionaryValue& header_footer_info, | |
| 25 PrintSettings* print_settings); | 31 PrintSettings* print_settings); |
| 26 | 32 |
| 27 // The default margins, in points. These values are based on 72 dpi, | 33 // The default margins, in points. These values are based on 72 dpi, |
| 28 // with 0.25 margins on top, left, and right, and 0.56 on bottom. | 34 // with 0.25 margins on top, left, and right, and 0.56 on bottom. |
| 29 static const double kTopMarginInInch; | 35 static const double kTopMarginInInch; |
| 30 static const double kRightMarginInInch; | 36 static const double kRightMarginInInch; |
| 31 static const double kBottomMarginInInch; | 37 static const double kBottomMarginInInch; |
| 32 static const double kLeftMarginInInch; | 38 static const double kLeftMarginInInch; |
| 33 | 39 |
| 34 private: | 40 private: |
| 35 DISALLOW_IMPLICIT_CONSTRUCTORS(PrintSettingsInitializerGtk); | 41 DISALLOW_IMPLICIT_CONSTRUCTORS(PrintSettingsInitializerGtk); |
| 36 }; | 42 }; |
| 37 | 43 |
| 38 } // namespace printing | 44 } // namespace printing |
| 39 | 45 |
| 40 #endif // PRINTING_PRINT_SETTINGS_INITIALIZER_GTK_H_ | 46 #endif // PRINTING_PRINT_SETTINGS_INITIALIZER_GTK_H_ |
| OLD | NEW |