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

Side by Side Diff: chrome/renderer/printing/print_web_view_helper.cc

Issue 603253003: Revert of Restored disable print preview policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/common/pref_names.cc ('k') | components/policy/resources/policy_templates.json » ('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) 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 "chrome/renderer/printing/print_web_view_helper.h" 5 #include "chrome/renderer/printing/print_web_view_helper.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 reset_prep_frame_view_(false), 777 reset_prep_frame_view_(false),
778 is_print_ready_metafile_sent_(false), 778 is_print_ready_metafile_sent_(false),
779 ignore_css_margins_(false), 779 ignore_css_margins_(false),
780 is_scripted_printing_blocked_(false), 780 is_scripted_printing_blocked_(false),
781 notify_browser_of_print_failure_(true), 781 notify_browser_of_print_failure_(true),
782 print_for_preview_(false), 782 print_for_preview_(false),
783 print_node_in_progress_(false), 783 print_node_in_progress_(false),
784 is_loading_(false), 784 is_loading_(false),
785 is_scripted_preview_delayed_(false), 785 is_scripted_preview_delayed_(false),
786 weak_ptr_factory_(this) { 786 weak_ptr_factory_(this) {
787 if (CommandLine::ForCurrentProcess()->HasSwitch(
788 switches::kDisablePrintPreview)) {
789 DisablePreview();
790 }
791 } 787 }
792 788
793 PrintWebViewHelper::~PrintWebViewHelper() {} 789 PrintWebViewHelper::~PrintWebViewHelper() {}
794 790
795 // static 791 // static
796 void PrintWebViewHelper::DisablePreview() { 792 void PrintWebViewHelper::DisablePreview() {
797 g_is_preview_enabled_ = false; 793 g_is_preview_enabled_ = false;
798 } 794 }
799 795
800 bool PrintWebViewHelper::IsScriptInitiatedPrintAllowed( 796 bool PrintWebViewHelper::IsScriptInitiatedPrintAllowed(
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2021 blink::WebConsoleMessage::LevelWarning, message)); 2017 blink::WebConsoleMessage::LevelWarning, message));
2022 return false; 2018 return false;
2023 } 2019 }
2024 2020
2025 void PrintWebViewHelper::ScriptingThrottler::Reset() { 2021 void PrintWebViewHelper::ScriptingThrottler::Reset() {
2026 // Reset counter on successful print. 2022 // Reset counter on successful print.
2027 count_ = 0; 2023 count_ = 0;
2028 } 2024 }
2029 2025
2030 } // namespace printing 2026 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | components/policy/resources/policy_templates.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698