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

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

Issue 557483002: Remove last use of WebFrame::isLoading() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 void PrepareFrameAndViewForPrint::RestoreSize() { 746 void PrepareFrameAndViewForPrint::RestoreSize() {
747 if (frame()) { 747 if (frame()) {
748 blink::WebView* web_view = frame_.GetFrame()->view(); 748 blink::WebView* web_view = frame_.GetFrame()->view();
749 web_view->resize(prev_view_size_); 749 web_view->resize(prev_view_size_);
750 if (blink::WebFrame* web_frame = web_view->mainFrame()) 750 if (blink::WebFrame* web_frame = web_view->mainFrame())
751 web_frame->setScrollOffset(prev_scroll_offset_); 751 web_frame->setScrollOffset(prev_scroll_offset_);
752 } 752 }
753 } 753 }
754 754
755 void PrepareFrameAndViewForPrint::FinishPrinting() { 755 void PrepareFrameAndViewForPrint::FinishPrinting() {
756 blink::WebFrame* frame = frame_.GetFrame(); 756 blink::WebLocalFrame* frame = frame_.GetFrame();
757 if (frame) { 757 if (frame) {
758 blink::WebView* web_view = frame->view(); 758 blink::WebView* web_view = frame->view();
759 if (is_printing_started_) { 759 if (is_printing_started_) {
760 is_printing_started_ = false; 760 is_printing_started_ = false;
761 frame->printEnd(); 761 frame->printEnd();
762 if (!owns_web_view_) { 762 if (!owns_web_view_) {
763 web_view->settings()->setShouldPrintBackgrounds(false); 763 web_view->settings()->setShouldPrintBackgrounds(false);
764 RestoreSize(); 764 RestoreSize();
765 } 765 }
766 } 766 }
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1964 } 1964 }
1965 1965
1966 void PrintWebViewHelper::SetPrintPagesParams( 1966 void PrintWebViewHelper::SetPrintPagesParams(
1967 const PrintMsg_PrintPages_Params& settings) { 1967 const PrintMsg_PrintPages_Params& settings) {
1968 print_pages_params_.reset(new PrintMsg_PrintPages_Params(settings)); 1968 print_pages_params_.reset(new PrintMsg_PrintPages_Params(settings));
1969 Send(new PrintHostMsg_DidGetDocumentCookie(routing_id(), 1969 Send(new PrintHostMsg_DidGetDocumentCookie(routing_id(),
1970 settings.params.document_cookie)); 1970 settings.params.document_cookie));
1971 } 1971 }
1972 1972
1973 } // namespace printing 1973 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698