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

Side by Side Diff: printing/printing_context_gtk.cc

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 | « printing/printing_context_gtk.h ('k') | printing/printing_context_mac.h » ('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 #include "printing/printing_context_gtk.h" 5 #include "printing/printing_context_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 #include <gtk/gtkprintunixdialog.h> 8 #include <gtk/gtkprintunixdialog.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void PrintingContextGtk::PrintDocument(const Metafile* metafile) { 52 void PrintingContextGtk::PrintDocument(const Metafile* metafile) {
53 DCHECK(print_dialog_); 53 DCHECK(print_dialog_);
54 DCHECK(metafile); 54 DCHECK(metafile);
55 print_dialog_->PrintDocument(metafile, document_name_); 55 print_dialog_->PrintDocument(metafile, document_name_);
56 } 56 }
57 57
58 void PrintingContextGtk::AskUserForSettings( 58 void PrintingContextGtk::AskUserForSettings(
59 gfx::NativeView parent_view, 59 gfx::NativeView parent_view,
60 int max_pages, 60 int max_pages,
61 bool has_selection, 61 bool has_selection,
62 PrintSettingsCallback* callback) { 62 const PrintSettingsCallback& callback) {
63 print_dialog_->ShowDialog(callback); 63 print_dialog_->ShowDialog(callback);
64 } 64 }
65 65
66 PrintingContext::Result PrintingContextGtk::UseDefaultSettings() { 66 PrintingContext::Result PrintingContextGtk::UseDefaultSettings() {
67 DCHECK(!in_print_job_); 67 DCHECK(!in_print_job_);
68 68
69 ResetSettings(); 69 ResetSettings();
70 if (!print_dialog_) { 70 if (!print_dialog_) {
71 print_dialog_ = create_dialog_func_(this); 71 print_dialog_ = create_dialog_func_(this);
72 print_dialog_->AddRefToDialog(); 72 print_dialog_->AddRefToDialog();
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // Intentional No-op. 148 // Intentional No-op.
149 } 149 }
150 150
151 gfx::NativeDrawingContext PrintingContextGtk::context() const { 151 gfx::NativeDrawingContext PrintingContextGtk::context() const {
152 // Intentional No-op. 152 // Intentional No-op.
153 return NULL; 153 return NULL;
154 } 154 }
155 155
156 } // namespace printing 156 } // namespace printing
157 157
OLDNEW
« no previous file with comments | « printing/printing_context_gtk.h ('k') | printing/printing_context_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698