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

Side by Side Diff: chrome/browser/printing/print_dialog_gtk.h

Issue 8549031: base::Bind: Convert PrintingContext::PrintSettingsCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win fix. Created 9 years, 1 month 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 | « no previous file | chrome/browser/printing/print_dialog_gtk.cc » ('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 #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 23 matching lines...) Expand all
34 // Creates and returns a print dialog. 34 // Creates and returns a print dialog.
35 static printing::PrintDialogGtkInterface* CreatePrintDialog( 35 static printing::PrintDialogGtkInterface* CreatePrintDialog(
36 PrintingContextGtk* context); 36 PrintingContextGtk* context);
37 37
38 // printing::PrintDialogGtkInterface implementation. 38 // printing::PrintDialogGtkInterface implementation.
39 virtual void UseDefaultSettings() OVERRIDE; 39 virtual void UseDefaultSettings() OVERRIDE;
40 virtual bool UpdateSettings(const base::DictionaryValue& job_settings, 40 virtual bool UpdateSettings(const base::DictionaryValue& job_settings,
41 const printing::PageRanges& ranges, 41 const printing::PageRanges& ranges,
42 printing::PrintSettings* settings) OVERRIDE; 42 printing::PrintSettings* settings) OVERRIDE;
43 virtual void ShowDialog( 43 virtual void ShowDialog(
44 PrintingContextGtk::PrintSettingsCallback* callback) OVERRIDE; 44 const PrintingContextGtk::PrintSettingsCallback& callback) OVERRIDE;
45 virtual void PrintDocument(const printing::Metafile* metafile, 45 virtual void PrintDocument(const printing::Metafile* metafile,
46 const string16& document_name) OVERRIDE; 46 const string16& document_name) OVERRIDE;
47 virtual void AddRefToDialog() OVERRIDE; 47 virtual void AddRefToDialog() OVERRIDE;
48 virtual void ReleaseDialog() OVERRIDE; 48 virtual void ReleaseDialog() OVERRIDE;
49 49
50 private: 50 private:
51 friend struct content::BrowserThread::DeleteOnThread< 51 friend struct content::BrowserThread::DeleteOnThread<
52 content::BrowserThread::UI>; 52 content::BrowserThread::UI>;
53 friend class DeleteTask<PrintDialogGtk>; 53 friend class DeleteTask<PrintDialogGtk>;
54 54
(...skipping 11 matching lines...) Expand all
66 gpointer user_data, 66 gpointer user_data,
67 GError* error); 67 GError* error);
68 void OnJobCompleted(GtkPrintJob* print_job, GError* error); 68 void OnJobCompleted(GtkPrintJob* print_job, GError* error);
69 69
70 // Helper function for initializing |context_|'s PrintSettings with a given 70 // Helper function for initializing |context_|'s PrintSettings with a given
71 // set of |page_ranges| and |settings|. 71 // set of |page_ranges| and |settings|.
72 void InitPrintSettings(const printing::PageRanges& page_ranges, 72 void InitPrintSettings(const printing::PageRanges& page_ranges,
73 printing::PrintSettings* settings); 73 printing::PrintSettings* settings);
74 74
75 // Printing dialog callback. 75 // Printing dialog callback.
76 PrintingContextGtk::PrintSettingsCallback* callback_; 76 PrintingContextGtk::PrintSettingsCallback callback_;
77 PrintingContextGtk* context_; 77 PrintingContextGtk* context_;
78 78
79 // Print dialog settings. PrintDialogGtk owns |dialog_| and holds references 79 // Print dialog settings. PrintDialogGtk owns |dialog_| and holds references
80 // to the other objects. 80 // to the other objects.
81 GtkWidget* dialog_; 81 GtkWidget* dialog_;
82 GtkPrintSettings* gtk_settings_; 82 GtkPrintSettings* gtk_settings_;
83 GtkPageSetup* page_setup_; 83 GtkPageSetup* page_setup_;
84 GtkPrinter* printer_; 84 GtkPrinter* printer_;
85 85
86 FilePath path_to_pdf_; 86 FilePath path_to_pdf_;
87 87
88 DISALLOW_COPY_AND_ASSIGN(PrintDialogGtk); 88 DISALLOW_COPY_AND_ASSIGN(PrintDialogGtk);
89 }; 89 };
90 90
91 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_GTK_H_ 91 #endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/printing/print_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698