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

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

Issue 8564040: Revert 110035 - Print Preview: Making margin selection sticky (part 2/2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « chrome/common/print_messages.h ('k') | chrome/test/data/webui/print_preview.js » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/print_web_view_helper.h" 5 #include "chrome/renderer/print_web_view_helper.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 if (!web_view) 1275 if (!web_view)
1276 web_view = render_view()->GetWebView(); 1276 web_view = render_view()->GetWebView();
1277 1277
1278 render_view()->RunModalAlertDialog( 1278 render_view()->RunModalAlertDialog(
1279 web_view->mainFrame(), 1279 web_view->mainFrame(),
1280 l10n_util::GetStringUTF16(IDS_PRINT_SPOOL_FAILED_ERROR_TEXT)); 1280 l10n_util::GetStringUTF16(IDS_PRINT_SPOOL_FAILED_ERROR_TEXT));
1281 } 1281 }
1282 1282
1283 void PrintWebViewHelper::RequestPrintPreview() { 1283 void PrintWebViewHelper::RequestPrintPreview() {
1284 old_print_pages_params_.reset(); 1284 old_print_pages_params_.reset();
1285 Send(new PrintHostMsg_RequestPrintPreview( 1285 Send(new PrintHostMsg_RequestPrintPreview(routing_id()));
1286 routing_id(), print_preview_context_.IsModifiable()));
1287 } 1286 }
1288 1287
1289 bool PrintWebViewHelper::CheckForCancel() { 1288 bool PrintWebViewHelper::CheckForCancel() {
1290 bool cancel = false; 1289 bool cancel = false;
1291 Send(new PrintHostMsg_CheckForCancel( 1290 Send(new PrintHostMsg_CheckForCancel(
1292 routing_id(), 1291 routing_id(),
1293 print_pages_params_->params.preview_ui_addr, 1292 print_pages_params_->params.preview_ui_addr,
1294 print_pages_params_->params.preview_request_id, 1293 print_pages_params_->params.preview_request_id,
1295 &cancel)); 1294 &cancel));
1296 if (cancel) 1295 if (cancel)
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 DCHECK(IsRendering()); 1562 DCHECK(IsRendering());
1564 return prep_frame_view_->GetPrintCanvasSize(); 1563 return prep_frame_view_->GetPrintCanvasSize();
1565 } 1564 }
1566 1565
1567 void PrintWebViewHelper::PrintPreviewContext::ClearContext() { 1566 void PrintWebViewHelper::PrintPreviewContext::ClearContext() {
1568 prep_frame_view_.reset(); 1567 prep_frame_view_.reset();
1569 metafile_.reset(); 1568 metafile_.reset();
1570 pages_to_render_.clear(); 1569 pages_to_render_.clear();
1571 error_ = PREVIEW_ERROR_NONE; 1570 error_ = PREVIEW_ERROR_NONE;
1572 } 1571 }
OLDNEW
« no previous file with comments | « chrome/common/print_messages.h ('k') | chrome/test/data/webui/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698