| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_PRINTING_PRINT_DIALOG_GTK_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_DIALOG_GTK_H_ |
| 6 #define CHROME_BROWSER_PRINTING_PRINT_DIALOG_GTK_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_DIALOG_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 #include <gtk/gtkprintunixdialog.h> | 10 #include <gtk/gtkprintunixdialog.h> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 const string16& document_name); | 39 const string16& document_name); |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 friend class base::RefCountedThreadSafe<PrintDialogGtk>; | 42 friend class base::RefCountedThreadSafe<PrintDialogGtk>; |
| 43 | 43 |
| 44 PrintDialogGtk(PrintingContextCairo::PrintSettingsCallback* callback, | 44 PrintDialogGtk(PrintingContextCairo::PrintSettingsCallback* callback, |
| 45 PrintingContextCairo* context); | 45 PrintingContextCairo* context); |
| 46 ~PrintDialogGtk(); | 46 ~PrintDialogGtk(); |
| 47 | 47 |
| 48 // Handles dialog response. | 48 // Handles dialog response. |
| 49 CHROMEGTK_CALLBACK_1(PrintDialogGtk, void, OnResponse, gint); | 49 CHROMEGTK_CALLBACK_1(PrintDialogGtk, void, OnResponse, int); |
| 50 | 50 |
| 51 // Saves data in |metafile| to disk for document named |document_name|. | 51 // Saves data in |metafile| to disk for document named |document_name|. |
| 52 void SaveDocumentToDisk(const NativeMetafile* metafile, | 52 void SaveDocumentToDisk(const NativeMetafile* metafile, |
| 53 const string16& document_name); | 53 const string16& document_name); |
| 54 | 54 |
| 55 // Prints document named |document_name|. | 55 // Prints document named |document_name|. |
| 56 void SendDocumentToPrinter(const string16& document_name); | 56 void SendDocumentToPrinter(const string16& document_name); |
| 57 | 57 |
| 58 // Handles print job response. | 58 // Handles print job response. |
| 59 static void OnJobCompletedThunk(GtkPrintJob* print_job, | 59 static void OnJobCompletedThunk(GtkPrintJob* print_job, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 74 GtkPrintSettings* gtk_settings_; | 74 GtkPrintSettings* gtk_settings_; |
| 75 | 75 |
| 76 // Event to signal when save document finishes. | 76 // Event to signal when save document finishes. |
| 77 base::WaitableEvent* save_document_event_; | 77 base::WaitableEvent* save_document_event_; |
| 78 FilePath path_to_pdf_; | 78 FilePath path_to_pdf_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(PrintDialogGtk); | 80 DISALLOW_COPY_AND_ASSIGN(PrintDialogGtk); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_GTK_H_ | 83 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_GTK_H_ |
| OLD | NEW |