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

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

Issue 597933002: Restored disable print preview policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Thu Sep 25 18:19:02 PDT 2014 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 }
787 } 791 }
788 792
789 PrintWebViewHelper::~PrintWebViewHelper() {} 793 PrintWebViewHelper::~PrintWebViewHelper() {}
790 794
791 // static 795 // static
792 void PrintWebViewHelper::DisablePreview() { 796 void PrintWebViewHelper::DisablePreview() {
793 g_is_preview_enabled_ = false; 797 g_is_preview_enabled_ = false;
794 } 798 }
795 799
796 bool PrintWebViewHelper::IsScriptInitiatedPrintAllowed( 800 bool PrintWebViewHelper::IsScriptInitiatedPrintAllowed(
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 blink::WebConsoleMessage::LevelWarning, message)); 2021 blink::WebConsoleMessage::LevelWarning, message));
2018 return false; 2022 return false;
2019 } 2023 }
2020 2024
2021 void PrintWebViewHelper::ScriptingThrottler::Reset() { 2025 void PrintWebViewHelper::ScriptingThrottler::Reset() {
2022 // Reset counter on successful print. 2026 // Reset counter on successful print.
2023 count_ = 0; 2027 count_ = 0;
2024 } 2028 }
2025 2029
2026 } // namespace printing 2030 } // 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