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

Unified Diff: chrome/browser/printing/print_dialog_gtk.h

Issue 200138: GTK: Add a dialog for printing. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/printing/print_dialog_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_dialog_gtk.h
===================================================================
--- chrome/browser/printing/print_dialog_gtk.h (revision 0)
+++ chrome/browser/printing/print_dialog_gtk.h (revision 0)
@@ -0,0 +1,55 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PRINTING_PRINT_DIALOG_GTK_H_
+#define CHROME_BROWSER_PRINTING_PRINT_DIALOG_GTK_H_
+
+#include <gtk/gtk.h>
+
+#include "base/basictypes.h"
+#include "base/file_path.h"
+
+class Browser;
+class MessageLoop;
+
+typedef struct _GtkPrintJob GtkPrintJob;
+
+// Currently this dialog only allows the user to choose a printer.
+class PrintDialogGtk {
+ public:
+ // Called on the IO thread. Posts the dialog creation action on the given
+ // loop.
+ static void CreatePrintDialogForPdf(const FilePath& path, MessageLoop* loop);
+
+ private:
+ explicit PrintDialogGtk(const FilePath& path_to_pdf);
+ ~PrintDialogGtk();
+
+ static void CreateDialogImpl(const FilePath& path);
+
+ static void OnResponseThunk(GtkDialog* dialog,
+ gint response_id,
+ gpointer user_data) {
+ reinterpret_cast<PrintDialogGtk*>(user_data)->OnResponse(response_id);
+ }
+ void OnResponse(gint response_id);
+
+ static void OnJobCompletedThunk(GtkPrintJob* print_job,
+ gpointer user_data,
+ GError* error) {
+ reinterpret_cast<PrintDialogGtk*>(user_data)->OnJobCompleted(print_job,
+ error);
+ }
+ void OnJobCompleted(GtkPrintJob* job, GError* error);
+
+ FilePath path_to_pdf_;
+
+ GtkWidget* dialog_;
+
+ Browser* browser_;
+
+ DISALLOW_COPY_AND_ASSIGN(PrintDialogGtk);
+};
+
+#endif // CHROME_BROWSER_PRINTING_PRINT_DIALOG_GTK_H_
Property changes on: chrome/browser/printing/print_dialog_gtk.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/printing/print_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698