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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 virtual void PrintDocument(const printing::Metafile* metafile, | 46 virtual void PrintDocument(const printing::Metafile* metafile, |
47 const string16& document_name); | 47 const string16& document_name); |
48 virtual void AddRefToDialog(); | 48 virtual void AddRefToDialog(); |
49 virtual void ReleaseDialog(); | 49 virtual void ReleaseDialog(); |
50 | 50 |
51 private: | 51 private: |
52 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; | 52 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; |
53 friend class DeleteTask<PrintDialogGtk>; | 53 friend class DeleteTask<PrintDialogGtk>; |
54 | 54 |
55 explicit PrintDialogGtk(PrintingContextCairo* context); | 55 explicit PrintDialogGtk(PrintingContextCairo* context); |
56 ~PrintDialogGtk(); | 56 virtual ~PrintDialogGtk(); |
57 | 57 |
58 // Handles dialog response. | 58 // Handles dialog response. |
59 CHROMEGTK_CALLBACK_1(PrintDialogGtk, void, OnResponse, int); | 59 CHROMEGTK_CALLBACK_1(PrintDialogGtk, void, OnResponse, int); |
60 | 60 |
61 // Saves data in |metafile| to disk for document named |document_name|. | 61 // Saves data in |metafile| to disk for document named |document_name|. |
62 void SaveDocumentToDisk(const printing::Metafile* metafile, | 62 void SaveDocumentToDisk(const printing::Metafile* metafile, |
63 const string16& document_name); | 63 const string16& document_name); |
64 | 64 |
65 // Prints document named |document_name|. | 65 // Prints document named |document_name|. |
66 void SendDocumentToPrinter(const string16& document_name); | 66 void SendDocumentToPrinter(const string16& document_name); |
(...skipping 21 matching lines...) Expand all Loading... |
88 | 88 |
89 // Event to signal when save document finishes. | 89 // Event to signal when save document finishes. |
90 scoped_ptr<base::WaitableEvent> save_document_event_; | 90 scoped_ptr<base::WaitableEvent> save_document_event_; |
91 | 91 |
92 FilePath path_to_pdf_; | 92 FilePath path_to_pdf_; |
93 | 93 |
94 DISALLOW_COPY_AND_ASSIGN(PrintDialogGtk); | 94 DISALLOW_COPY_AND_ASSIGN(PrintDialogGtk); |
95 }; | 95 }; |
96 | 96 |
97 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_GTK_H_ | 97 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_GTK_H_ |
OLD | NEW |