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

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

Issue 6261025: Refactor win printing workflow to support print preview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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) 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/logging.h" 9 #include "base/logging.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 } 503 }
504 } 504 }
505 505
506 void PrintWebViewHelper::RenderPagesForPreview(WebFrame *frame) { 506 void PrintWebViewHelper::RenderPagesForPreview(WebFrame *frame) {
507 ViewMsg_PrintPages_Params print_settings = *print_pages_params_; 507 ViewMsg_PrintPages_Params print_settings = *print_pages_params_;
508 ViewHostMsg_DidPreviewDocument_Params print_params; 508 ViewHostMsg_DidPreviewDocument_Params print_params;
509 CreatePreviewDocument(print_settings, frame, &print_params); 509 CreatePreviewDocument(print_settings, frame, &print_params);
510 Send(new ViewHostMsg_PagesReadyForPreview(routing_id(), print_params)); 510 Send(new ViewHostMsg_PagesReadyForPreview(routing_id(), print_params));
511 } 511 }
512 512
513 #if !defined(OS_MACOSX) 513 #if defined(OS_LINUX)
514 void PrintWebViewHelper::CreatePreviewDocument( 514 void PrintWebViewHelper::CreatePreviewDocument(
515 const ViewMsg_PrintPages_Params& params, 515 const ViewMsg_PrintPages_Params& params,
516 WebFrame* frame, 516 WebFrame* frame,
517 ViewHostMsg_DidPreviewDocument_Params* print_params) { 517 ViewHostMsg_DidPreviewDocument_Params* print_params) {
518 // TODO(kmadhusu): Implement this function for windows & linux. 518 // TODO(kmadhusu): Implement this function for windows & linux.
519 print_params->document_cookie = params.params.document_cookie; 519 print_params->document_cookie = params.params.document_cookie;
520 } 520 }
521 #endif 521 #endif
522 522
523 #if defined(OS_MACOSX) 523 #if defined(OS_MACOSX)
(...skipping 10 matching lines...) Expand all
534 shared_buf.GiveToProcess(base::GetCurrentProcessHandle(), 534 shared_buf.GiveToProcess(base::GetCurrentProcessHandle(),
535 shared_mem_handle); 535 shared_mem_handle);
536 return true; 536 return true;
537 } 537 }
538 } 538 }
539 } 539 }
540 NOTREACHED(); 540 NOTREACHED();
541 return false; 541 return false;
542 } 542 }
543 #endif 543 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698