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

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

Issue 23264035: Merge 218339 "Submitting https://codereview.chromium.org/2311600..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1599/src/
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
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 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 1304
1305 int page_count = prep_frame_view_->GetExpectedPageCount(); 1305 int page_count = prep_frame_view_->GetExpectedPageCount();
1306 if (!page_count) { 1306 if (!page_count) {
1307 LOG(ERROR) << "Can't print 0 pages."; 1307 LOG(ERROR) << "Can't print 0 pages.";
1308 return DidFinishPrinting(FAIL_PRINT); 1308 return DidFinishPrinting(FAIL_PRINT);
1309 } 1309 }
1310 1310
1311 const PrintMsg_PrintPages_Params& params = *print_pages_params_; 1311 const PrintMsg_PrintPages_Params& params = *print_pages_params_;
1312 const PrintMsg_Print_Params& print_params = params.params; 1312 const PrintMsg_Print_Params& print_params = params.params;
1313 1313
1314 #if !defined(OS_CHROMEOS) 1314 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
1315 // TODO(vitalybuka): should be page_count or valid pages from params.pages. 1315 // TODO(vitalybuka): should be page_count or valid pages from params.pages.
1316 // See http://crbug.com/161576 1316 // See http://crbug.com/161576
1317 Send(new PrintHostMsg_DidGetPrintedPagesCount(routing_id(), 1317 Send(new PrintHostMsg_DidGetPrintedPagesCount(routing_id(),
1318 print_params.document_cookie, 1318 print_params.document_cookie,
1319 page_count)); 1319 page_count));
1320 #endif // !defined(OS_CHROMEOS) 1320 #endif // !defined(OS_CHROMEOS)
1321 1321
1322 if (print_params.preview_ui_id < 0) { 1322 if (print_params.preview_ui_id < 0) {
1323 // Printing for system dialog. 1323 // Printing for system dialog.
1324 int printed_count = params.pages.empty() ? page_count : params.pages.size(); 1324 int printed_count = params.pages.empty() ? page_count : params.pages.size();
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1985 } 1985 }
1986 1986
1987 void PrintWebViewHelper::PrintPreviewContext::ClearContext() { 1987 void PrintWebViewHelper::PrintPreviewContext::ClearContext() {
1988 prep_frame_view_.reset(); 1988 prep_frame_view_.reset();
1989 metafile_.reset(); 1989 metafile_.reset();
1990 pages_to_render_.clear(); 1990 pages_to_render_.clear();
1991 error_ = PREVIEW_ERROR_NONE; 1991 error_ = PREVIEW_ERROR_NONE;
1992 } 1992 }
1993 1993
1994 } // namespace printing 1994 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/renderer/printing/print_web_view_helper.h ('k') | chrome/renderer/printing/print_web_view_helper_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698