OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/printing/print_dialog_gtk.h" | 5 #include "chrome/browser/printing/print_dialog_gtk.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <gtk/gtkunixprint.h> | 8 #include <gtk/gtkunixprint.h> |
9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/file_util.h" | 16 #include "base/file_util.h" |
17 #include "base/files/file_util_proxy.h" | 17 #include "base/files/file_util_proxy.h" |
18 #include "base/logging.h" | 18 #include "base/logging.h" |
19 #include "base/message_loop/message_loop_proxy.h" | 19 #include "base/message_loop/message_loop_proxy.h" |
20 #include "base/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
21 #include "base/values.h" | 21 #include "base/values.h" |
22 #include "printing/metafile.h" | 22 #include "printing/metafile.h" |
23 #include "printing/print_job_constants.h" | 23 #include "printing/print_job_constants.h" |
24 #include "printing/print_settings.h" | 24 #include "printing/print_settings.h" |
25 #include "printing/print_settings_initializer_gtk.h" | 25 #include "printing/print_settings_initializer_gtk.h" |
26 | 26 |
27 using content::BrowserThread; | 27 using content::BrowserThread; |
28 using printing::PageRanges; | 28 using printing::PageRanges; |
29 using printing::PrintSettings; | 29 using printing::PrintSettings; |
30 | 30 |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 // Printing finished. Matches AddRef() in PrintDocument(); | 412 // Printing finished. Matches AddRef() in PrintDocument(); |
413 Release(); | 413 Release(); |
414 } | 414 } |
415 | 415 |
416 void PrintDialogGtk::InitPrintSettings(const PageRanges& page_ranges, | 416 void PrintDialogGtk::InitPrintSettings(const PageRanges& page_ranges, |
417 PrintSettings* settings) { | 417 PrintSettings* settings) { |
418 printing::PrintSettingsInitializerGtk::InitPrintSettings( | 418 printing::PrintSettingsInitializerGtk::InitPrintSettings( |
419 gtk_settings_, page_setup_, page_ranges, false, settings); | 419 gtk_settings_, page_setup_, page_ranges, false, settings); |
420 context_->InitWithSettings(*settings); | 420 context_->InitWithSettings(*settings); |
421 } | 421 } |
OLD | NEW |