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

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

Issue 2847273002: Reverse postscript flag direction (Closed)
Patch Set: Restore previous values to histograms.xml Created 3 years, 7 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 | « chrome/browser/flag_descriptions.cc ('k') | chrome/common/chrome_features.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/print_view_manager_base.h" 5 #include "chrome/browser/printing/print_view_manager_base.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 #if defined(OS_WIN) 182 #if defined(OS_WIN)
183 print_job_->AppendPrintedPage(params.page_number); 183 print_job_->AppendPrintedPage(params.page_number);
184 if (metafile_must_be_valid) { 184 if (metafile_must_be_valid) {
185 scoped_refptr<base::RefCountedBytes> bytes = new base::RefCountedBytes( 185 scoped_refptr<base::RefCountedBytes> bytes = new base::RefCountedBytes(
186 reinterpret_cast<const unsigned char*>(shared_buf->memory()), 186 reinterpret_cast<const unsigned char*>(shared_buf->memory()),
187 params.data_size); 187 params.data_size);
188 document->DebugDumpData(bytes.get(), FILE_PATH_LITERAL(".pdf")); 188 document->DebugDumpData(bytes.get(), FILE_PATH_LITERAL(".pdf"));
189 189
190 const auto& settings = document->settings(); 190 const auto& settings = document->settings();
191 if ((settings.printer_is_ps2() || settings.printer_is_ps3()) && 191 if ((settings.printer_is_ps2() || settings.printer_is_ps3()) &&
192 base::FeatureList::IsEnabled(features::kPostScriptPrinting)) { 192 !base::FeatureList::IsEnabled(features::kDisablePostScriptPrinting)) {
193 print_job_->StartPdfToPostScriptConversion(bytes, params.content_area, 193 print_job_->StartPdfToPostScriptConversion(bytes, params.content_area,
194 params.physical_offsets, 194 params.physical_offsets,
195 settings.printer_is_ps2()); 195 settings.printer_is_ps2());
196 } else { 196 } else {
197 // TODO(thestig): Figure out why rendering text with GDI results in random 197 // TODO(thestig): Figure out why rendering text with GDI results in random
198 // missing characters for some users. https://crbug.com/658606 198 // missing characters for some users. https://crbug.com/658606
199 // Update : The missing letters seem to have been caused by the same 199 // Update : The missing letters seem to have been caused by the same
200 // problem as https://crbug.com/659604 which was resolved. GDI printing 200 // problem as https://crbug.com/659604 which was resolved. GDI printing
201 // seems to work with the fix for this bug applied. 201 // seems to work with the fix for this bug applied.
202 bool print_text_with_gdi = settings.print_text_with_gdi() && 202 bool print_text_with_gdi = settings.print_text_with_gdi() &&
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 BrowserThread::IO, FROM_HERE, 577 BrowserThread::IO, FROM_HERE,
578 base::BindOnce(&PrinterQuery::StopWorker, printer_query)); 578 base::BindOnce(&PrinterQuery::StopWorker, printer_query));
579 } 579 }
580 580
581 void PrintViewManagerBase::SendPrintingEnabled(bool enabled, 581 void PrintViewManagerBase::SendPrintingEnabled(bool enabled,
582 content::RenderFrameHost* rfh) { 582 content::RenderFrameHost* rfh) {
583 rfh->Send(new PrintMsg_SetPrintingEnabled(rfh->GetRoutingID(), enabled)); 583 rfh->Send(new PrintMsg_SetPrintingEnabled(rfh->GetRoutingID(), enabled));
584 } 584 }
585 585
586 } // namespace printing 586 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | chrome/common/chrome_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698