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

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

Issue 1128453003: Remove the OOP PDF flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 <string> 7 #include <string>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 if (pdf_element.isNull()) { 897 if (pdf_element.isNull()) {
898 NOTREACHED(); 898 NOTREACHED();
899 return; 899 return;
900 } 900 }
901 901
902 // The out-of-process plugin element is nested within a frame. In tests, there 902 // The out-of-process plugin element is nested within a frame. In tests, there
903 // may not be an iframe containing the out-of-process plugin, so continue with 903 // may not be an iframe containing the out-of-process plugin, so continue with
904 // the element with ID "pdf-viewer" if it isn't an iframe. 904 // the element with ID "pdf-viewer" if it isn't an iframe.
905 blink::WebLocalFrame* plugin_frame = pdf_element.document().frame(); 905 blink::WebLocalFrame* plugin_frame = pdf_element.document().frame();
906 blink::WebElement plugin_element = pdf_element; 906 blink::WebElement plugin_element = pdf_element;
907 if (delegate_->IsOutOfProcessPdfEnabled() && 907 if (pdf_element.hasHTMLTagName("iframe")) {
908 pdf_element.hasHTMLTagName("iframe")) {
909 plugin_frame = blink::WebLocalFrame::fromFrameOwnerElement(pdf_element); 908 plugin_frame = blink::WebLocalFrame::fromFrameOwnerElement(pdf_element);
910 plugin_element = delegate_->GetPdfElement(plugin_frame); 909 plugin_element = delegate_->GetPdfElement(plugin_frame);
911 if (plugin_element.isNull()) { 910 if (plugin_element.isNull()) {
912 NOTREACHED(); 911 NOTREACHED();
913 return; 912 return;
914 } 913 }
915 } 914 }
916 915
917 // Set |print_for_preview_| flag and autoreset it to back to original 916 // Set |print_for_preview_| flag and autoreset it to back to original
918 // on return. 917 // on return.
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
2062 blink::WebConsoleMessage::LevelWarning, message)); 2061 blink::WebConsoleMessage::LevelWarning, message));
2063 return false; 2062 return false;
2064 } 2063 }
2065 2064
2066 void PrintWebViewHelper::ScriptingThrottler::Reset() { 2065 void PrintWebViewHelper::ScriptingThrottler::Reset() {
2067 // Reset counter on successful print. 2066 // Reset counter on successful print.
2068 count_ = 0; 2067 count_ = 0;
2069 } 2068 }
2070 2069
2071 } // namespace printing 2070 } // namespace printing
OLDNEW
« no previous file with comments | « components/printing/renderer/print_web_view_helper.h ('k') | components/printing/test/print_test_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698