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

Unified Diff: chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc

Issue 1234223005: Initial gtk3 support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Silence gtk memory leak Created 5 years, 3 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc
diff --git a/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc b/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc
index 3ade5923dbc8165c0eb8ab9aaa87a8d9196b545e..180de273d9df02e85ee066c88884633615089f24 100644
--- a/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc
+++ b/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc
@@ -488,6 +488,18 @@ void PrintDialogGtk2::OnResponse(GtkWidget* dialog, int response_id) {
}
}
+
+
+static void OnJobCompletedThunk(GtkPrintJob* print_job,
+ gpointer user_data,
+#if GTK_MAJOR_VERSION == 2
+ GError* error
+#else
+ const GError* error
+#endif
+ ) {
+ static_cast<PrintDialogGtk2*>(user_data)->OnJobCompleted(print_job, error);
+}
void PrintDialogGtk2::SendDocumentToPrinter(
const base::string16& document_name) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -512,14 +524,8 @@ void PrintDialogGtk2::SendDocumentToPrinter(
gtk_print_job_send(print_job, OnJobCompletedThunk, this, NULL);
}
-// static
-void PrintDialogGtk2::OnJobCompletedThunk(GtkPrintJob* print_job,
- gpointer user_data,
- GError* error) {
- static_cast<PrintDialogGtk2*>(user_data)->OnJobCompleted(print_job, error);
-}
-
-void PrintDialogGtk2::OnJobCompleted(GtkPrintJob* print_job, GError* error) {
+void PrintDialogGtk2::OnJobCompleted(GtkPrintJob* print_job,
+ const GError* error) {
if (error)
LOG(ERROR) << "Printing failed: " << error->message;
if (print_job)
« no previous file with comments | « chrome/browser/ui/libgtk2ui/print_dialog_gtk2.h ('k') | chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698