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

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: rebase again, resolve conflicts Created 4 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
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 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 params.cookie = print_pages_params_->params.document_cookie; 1697 params.cookie = print_pages_params_->params.document_cookie;
1698 params.has_selection = frame->hasSelection(); 1698 params.has_selection = frame->hasSelection();
1699 params.expected_pages_count = expected_pages_count; 1699 params.expected_pages_count = expected_pages_count;
1700 MarginType margin_type = DEFAULT_MARGINS; 1700 MarginType margin_type = DEFAULT_MARGINS;
1701 if (PrintingNodeOrPdfFrame(frame, node)) { 1701 if (PrintingNodeOrPdfFrame(frame, node)) {
1702 margin_type = 1702 margin_type =
1703 GetMarginsForPdf(frame, node, print_pages_params_->params); 1703 GetMarginsForPdf(frame, node, print_pages_params_->params);
1704 } 1704 }
1705 params.margin_type = margin_type; 1705 params.margin_type = margin_type;
1706 params.is_scripted = is_scripted; 1706 params.is_scripted = is_scripted;
1707 params.is_modifiable = !PrintingNodeOrPdfFrame(frame, node);
1707 1708
1708 Send(new PrintHostMsg_DidShowPrintDialog(routing_id())); 1709 Send(new PrintHostMsg_DidShowPrintDialog(routing_id()));
1709 1710
1710 // PrintHostMsg_ScriptedPrint will reset print_scaling_option, so we save the 1711 // PrintHostMsg_ScriptedPrint will reset print_scaling_option, so we save the
1711 // value before and restore it afterwards. 1712 // value before and restore it afterwards.
1712 blink::WebPrintScalingOption scaling_option = 1713 blink::WebPrintScalingOption scaling_option =
1713 print_pages_params_->params.print_scaling_option; 1714 print_pages_params_->params.print_scaling_option;
1714 1715
1715 print_pages_params_.reset(); 1716 print_pages_params_.reset();
1716 IPC::SyncMessage* msg = 1717 IPC::SyncMessage* msg =
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 blink::WebConsoleMessage::LevelWarning, message)); 2253 blink::WebConsoleMessage::LevelWarning, message));
2253 return false; 2254 return false;
2254 } 2255 }
2255 2256
2256 void PrintWebViewHelper::ScriptingThrottler::Reset() { 2257 void PrintWebViewHelper::ScriptingThrottler::Reset() {
2257 // Reset counter on successful print. 2258 // Reset counter on successful print.
2258 count_ = 0; 2259 count_ = 0;
2259 } 2260 }
2260 2261
2261 } // namespace printing 2262 } // namespace printing
OLDNEW
« no previous file with comments | « components/printing/common/print_messages.h ('k') | content/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698