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

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

Issue 1320783002: Make SharedMemoryHandle a class on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_global
Patch Set: Rebase. Created 5 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/process/process_handle.h" 9 #include "base/process/process_handle.h"
10 #include "components/printing/common/print_messages.h" 10 #include "components/printing/common/print_messages.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 printed_page_params.data_size = metafile.GetDataSize(); 104 printed_page_params.data_size = metafile.GetDataSize();
105 printed_page_params.document_cookie = params.params.document_cookie; 105 printed_page_params.document_cookie = params.params.document_cookie;
106 printed_page_params.page_size = params.params.page_size; 106 printed_page_params.page_size = params.params.page_size;
107 107
108 for (size_t i = 0; i < printed_pages.size(); ++i) { 108 for (size_t i = 0; i < printed_pages.size(); ++i) {
109 printed_page_params.page_number = printed_pages[i]; 109 printed_page_params.page_number = printed_pages[i];
110 printed_page_params.page_size = page_size_in_dpi[i]; 110 printed_page_params.page_size = page_size_in_dpi[i];
111 printed_page_params.content_area = content_area_in_dpi[i]; 111 printed_page_params.content_area = content_area_in_dpi[i];
112 Send(new PrintHostMsg_DidPrintPage(routing_id(), printed_page_params)); 112 Send(new PrintHostMsg_DidPrintPage(routing_id(), printed_page_params));
113 // Send the rest of the pages with an invalid metafile handle. 113 // Send the rest of the pages with an invalid metafile handle.
114 printed_page_params.metafile_data_handle = nullptr; 114 printed_page_params.metafile_data_handle = base::SharedMemoryHandle();
115 } 115 }
116 return true; 116 return true;
117 } 117 }
118 118
119 void PrintWebViewHelper::PrintPageInternal( 119 void PrintWebViewHelper::PrintPageInternal(
120 const PrintMsg_PrintPage_Params& params, 120 const PrintMsg_PrintPage_Params& params,
121 WebFrame* frame, 121 WebFrame* frame,
122 PdfMetafileSkia* metafile, 122 PdfMetafileSkia* metafile,
123 gfx::Size* page_size_in_dpi, 123 gfx::Size* page_size_in_dpi,
124 gfx::Rect* content_area_in_dpi) { 124 gfx::Rect* content_area_in_dpi) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 shared_mem_handle)) { 200 shared_mem_handle)) {
201 return false; 201 return false;
202 } 202 }
203 203
204 Send(new PrintHostMsg_DuplicateSection(routing_id(), *shared_mem_handle, 204 Send(new PrintHostMsg_DuplicateSection(routing_id(), *shared_mem_handle,
205 shared_mem_handle)); 205 shared_mem_handle));
206 return true; 206 return true;
207 } 207 }
208 208
209 } // namespace printing 209 } // namespace printing
OLDNEW
« no previous file with comments | « components/nacl/loader/nacl_ipc_adapter.cc ('k') | content/browser/compositor/software_output_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698