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

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

Issue 756653005: Change the flag which enables OOP PDF to an enable/disable flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/chrome_switches.cc ('k') | tools/metrics/histograms/histograms.xml » ('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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 // chrome/browser/resources/print_preview/print_preview.js 900 // chrome/browser/resources/print_preview/print_preview.js
901 blink::WebElement pdf_element = document.getElementById("pdf-viewer"); 901 blink::WebElement pdf_element = document.getElementById("pdf-viewer");
902 if (pdf_element.isNull()) { 902 if (pdf_element.isNull()) {
903 NOTREACHED(); 903 NOTREACHED();
904 return; 904 return;
905 } 905 }
906 906
907 // The out-of-process plugin element is nested within a frame. 907 // The out-of-process plugin element is nested within a frame.
908 blink::WebLocalFrame* plugin_frame = pdf_element.document().frame(); 908 blink::WebLocalFrame* plugin_frame = pdf_element.document().frame();
909 blink::WebElement plugin_element = pdf_element; 909 blink::WebElement plugin_element = pdf_element;
910 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kOutOfProcessPdf)) { 910 if (switches::OutOfProcessPdfEnabled()) {
911 if (!pdf_element.hasHTMLTagName("iframe")) { 911 if (!pdf_element.hasHTMLTagName("iframe")) {
912 NOTREACHED(); 912 NOTREACHED();
913 return; 913 return;
914 } 914 }
915 plugin_frame = blink::WebLocalFrame::fromFrameOwnerElement(pdf_element); 915 plugin_frame = blink::WebLocalFrame::fromFrameOwnerElement(pdf_element);
916 plugin_element = GetPdfElement(plugin_frame); 916 plugin_element = GetPdfElement(plugin_frame);
917 if (plugin_element.isNull()) { 917 if (plugin_element.isNull()) {
918 NOTREACHED(); 918 NOTREACHED();
919 return; 919 return;
920 } 920 }
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
2055 blink::WebConsoleMessage::LevelWarning, message)); 2055 blink::WebConsoleMessage::LevelWarning, message));
2056 return false; 2056 return false;
2057 } 2057 }
2058 2058
2059 void PrintWebViewHelper::ScriptingThrottler::Reset() { 2059 void PrintWebViewHelper::ScriptingThrottler::Reset() {
2060 // Reset counter on successful print. 2060 // Reset counter on successful print.
2061 count_ = 0; 2061 count_ = 0;
2062 } 2062 }
2063 2063
2064 } // namespace printing 2064 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698