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

Side by Side Diff: printing/printing_context_linux.cc

Issue 568633002: Extracted MetafilePlayer interface from printing::MetafilePlayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_expose
Patch Set: Thu Sep 11 22:54:16 PDT 2014 Created 6 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 unified diff | Download patch
« no previous file with comments | « printing/printing_context_linux.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_linux.h" 5 #include "printing/printing_context_linux.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "printing/metafile.h" 9 #include "printing/metafile.h"
10 #include "printing/print_dialog_gtk_interface.h" 10 #include "printing/print_dialog_gtk_interface.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 // static 54 // static
55 void PrintingContextLinux::SetPdfPaperSizeFunction( 55 void PrintingContextLinux::SetPdfPaperSizeFunction(
56 gfx::Size (*get_pdf_paper_size)(PrintingContextLinux* context)) { 56 gfx::Size (*get_pdf_paper_size)(PrintingContextLinux* context)) {
57 DCHECK(get_pdf_paper_size); 57 DCHECK(get_pdf_paper_size);
58 DCHECK(!get_pdf_paper_size_); 58 DCHECK(!get_pdf_paper_size_);
59 get_pdf_paper_size_ = get_pdf_paper_size; 59 get_pdf_paper_size_ = get_pdf_paper_size;
60 } 60 }
61 61
62 void PrintingContextLinux::PrintDocument(const Metafile* metafile) { 62 void PrintingContextLinux::PrintDocument(const MetafilePlayer& metafile) {
63 DCHECK(print_dialog_); 63 DCHECK(print_dialog_);
64 DCHECK(metafile);
65 print_dialog_->PrintDocument(metafile, document_name_); 64 print_dialog_->PrintDocument(metafile, document_name_);
66 } 65 }
67 66
68 void PrintingContextLinux::AskUserForSettings( 67 void PrintingContextLinux::AskUserForSettings(
69 int max_pages, 68 int max_pages,
70 bool has_selection, 69 bool has_selection,
71 const PrintSettingsCallback& callback) { 70 const PrintSettingsCallback& callback) {
72 if (!print_dialog_) { 71 if (!print_dialog_) {
73 // Can only get here if the renderer is sending bad messages. 72 // Can only get here if the renderer is sending bad messages.
74 // http://crbug.com/341777 73 // http://crbug.com/341777
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 void PrintingContextLinux::ReleaseContext() { 181 void PrintingContextLinux::ReleaseContext() {
183 // Intentional No-op. 182 // Intentional No-op.
184 } 183 }
185 184
186 gfx::NativeDrawingContext PrintingContextLinux::context() const { 185 gfx::NativeDrawingContext PrintingContextLinux::context() const {
187 // Intentional No-op. 186 // Intentional No-op.
188 return NULL; 187 return NULL;
189 } 188 }
190 189
191 } // namespace printing 190 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printing_context_linux.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698