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

Side by Side Diff: components/printing/renderer/print_web_view_helper.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: Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/printing/renderer/print_web_view_helper.h" 5 #include "components/printing/renderer/print_web_view_helper.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 params.cookie = print_pages_params_->params.document_cookie; 1695 params.cookie = print_pages_params_->params.document_cookie;
1696 params.has_selection = frame->hasSelection(); 1696 params.has_selection = frame->hasSelection();
1697 params.expected_pages_count = expected_pages_count; 1697 params.expected_pages_count = expected_pages_count;
1698 MarginType margin_type = DEFAULT_MARGINS; 1698 MarginType margin_type = DEFAULT_MARGINS;
1699 if (PrintingNodeOrPdfFrame(frame, node)) { 1699 if (PrintingNodeOrPdfFrame(frame, node)) {
1700 margin_type = 1700 margin_type =
1701 GetMarginsForPdf(frame, node, print_pages_params_->params); 1701 GetMarginsForPdf(frame, node, print_pages_params_->params);
1702 } 1702 }
1703 params.margin_type = margin_type; 1703 params.margin_type = margin_type;
1704 params.is_scripted = is_scripted; 1704 params.is_scripted = is_scripted;
1705 params.is_modifiable = !PrintingNodeOrPdfFrame(frame, node);
1705 1706
1706 Send(new PrintHostMsg_DidShowPrintDialog(routing_id())); 1707 Send(new PrintHostMsg_DidShowPrintDialog(routing_id()));
1707 1708
1708 // PrintHostMsg_ScriptedPrint will reset print_scaling_option, so we save the 1709 // PrintHostMsg_ScriptedPrint will reset print_scaling_option, so we save the
1709 // value before and restore it afterwards. 1710 // value before and restore it afterwards.
1710 blink::WebPrintScalingOption scaling_option = 1711 blink::WebPrintScalingOption scaling_option =
1711 print_pages_params_->params.print_scaling_option; 1712 print_pages_params_->params.print_scaling_option;
1712 1713
1713 print_pages_params_.reset(); 1714 print_pages_params_.reset();
1714 IPC::SyncMessage* msg = 1715 IPC::SyncMessage* msg =
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
2250 blink::WebConsoleMessage::LevelWarning, message)); 2251 blink::WebConsoleMessage::LevelWarning, message));
2251 return false; 2252 return false;
2252 } 2253 }
2253 2254
2254 void PrintWebViewHelper::ScriptingThrottler::Reset() { 2255 void PrintWebViewHelper::ScriptingThrottler::Reset() {
2255 // Reset counter on successful print. 2256 // Reset counter on successful print.
2256 count_ = 0; 2257 count_ = 0;
2257 } 2258 }
2258 2259
2259 } // namespace printing 2260 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698