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

Side by Side Diff: printing/printing_context.cc

Issue 2114583002: Windows: Make it possible to print text with GDI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again, resolve conflicts Created 4 years, 4 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.h ('k') | printing/printing_context_system_dialog_win.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.h" 5 #include "printing/printing_context.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/page_setup.h" 9 #include "printing/page_setup.h"
10 #include "printing/page_size_margins.h" 10 #include "printing/page_size_margins.h"
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 27
28 PrintingContext::~PrintingContext() { 28 PrintingContext::~PrintingContext() {
29 } 29 }
30 30
31 void PrintingContext::set_margin_type(MarginType type) { 31 void PrintingContext::set_margin_type(MarginType type) {
32 DCHECK(type != CUSTOM_MARGINS); 32 DCHECK(type != CUSTOM_MARGINS);
33 settings_.set_margin_type(type); 33 settings_.set_margin_type(type);
34 } 34 }
35 35
36 void PrintingContext::set_is_modifiable(bool is_modifiable) {
37 #if defined(OS_WIN)
38 settings_.set_print_text_with_gdi(is_modifiable);
39 #endif
40 }
41
36 void PrintingContext::ResetSettings() { 42 void PrintingContext::ResetSettings() {
37 ReleaseContext(); 43 ReleaseContext();
38 44
39 settings_.Clear(); 45 settings_.Clear();
40 46
41 in_print_job_ = false; 47 in_print_job_ = false;
42 abort_printing_ = false; 48 abort_printing_ = false;
43 } 49 }
44 50
45 PrintingContext::Result PrintingContext::OnError() { 51 PrintingContext::Result PrintingContext::OnError() {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 #endif 130 #endif
125 131
126 int page_count = 0; 132 int page_count = 0;
127 job_settings.GetInteger(kSettingPreviewPageCount, &page_count); 133 job_settings.GetInteger(kSettingPreviewPageCount, &page_count);
128 134
129 return UpdatePrinterSettings(open_in_external_preview, show_system_dialog, 135 return UpdatePrinterSettings(open_in_external_preview, show_system_dialog,
130 page_count); 136 page_count);
131 } 137 }
132 138
133 } // namespace printing 139 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printing_context.h ('k') | printing/printing_context_system_dialog_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698