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

Side by Side Diff: chrome/browser/printing/pdf_to_emf_converter.cc

Issue 2970473002: Add generic text printing (Closed)
Patch Set: Change enum names Created 3 years, 5 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 | « no previous file | chrome/browser/printing/print_job.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 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 "chrome/browser/printing/pdf_to_emf_converter.h" 5 #include "chrome/browser/printing/pdf_to_emf_converter.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 GetPageCallbacks get_page_callbacks_; 221 GetPageCallbacks get_page_callbacks_;
222 222
223 DISALLOW_COPY_AND_ASSIGN(PdfConverterUtilityProcessHostClient); 223 DISALLOW_COPY_AND_ASSIGN(PdfConverterUtilityProcessHostClient);
224 }; 224 };
225 225
226 std::unique_ptr<MetafilePlayer> 226 std::unique_ptr<MetafilePlayer>
227 PdfConverterUtilityProcessHostClient::GetFileFromTemp( 227 PdfConverterUtilityProcessHostClient::GetFileFromTemp(
228 std::unique_ptr<base::File, content::BrowserThread::DeleteOnFileThread> 228 std::unique_ptr<base::File, content::BrowserThread::DeleteOnFileThread>
229 temp_file) { 229 temp_file) {
230 if (settings_.mode == PdfRenderSettings::Mode::POSTSCRIPT_LEVEL2 || 230 if (settings_.mode == PdfRenderSettings::Mode::POSTSCRIPT_LEVEL2 ||
231 settings_.mode == PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3) { 231 settings_.mode == PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3 ||
232 settings_.mode == PdfRenderSettings::Mode::TEXTONLY) {
232 return base::MakeUnique<PostScriptMetaFile>(temp_dir_, 233 return base::MakeUnique<PostScriptMetaFile>(temp_dir_,
233 std::move(temp_file)); 234 std::move(temp_file));
234 } 235 }
235 return base::MakeUnique<LazyEmf>(temp_dir_, std::move(temp_file)); 236 return base::MakeUnique<LazyEmf>(temp_dir_, std::move(temp_file));
236 } 237 }
237 238
238 class PdfConverterImpl : public PdfConverter { 239 class PdfConverterImpl : public PdfConverter {
239 public: 240 public:
240 PdfConverterImpl(); 241 PdfConverterImpl();
241 242
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 std::unique_ptr<PdfConverterImpl> converter = 636 std::unique_ptr<PdfConverterImpl> converter =
636 base::MakeUnique<PdfConverterImpl>(); 637 base::MakeUnique<PdfConverterImpl>();
637 converter->Start( 638 converter->Start(
638 new PdfConverterUtilityProcessHostClient(converter->GetWeakPtr(), 639 new PdfConverterUtilityProcessHostClient(converter->GetWeakPtr(),
639 conversion_settings), 640 conversion_settings),
640 data, start_callback); 641 data, start_callback);
641 return std::move(converter); 642 return std::move(converter);
642 } 643 }
643 644
644 } // namespace printing 645 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/printing/print_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698