| OLD | NEW |
| 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 "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/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
| 11 #include "base/win/scoped_gdi_object.h" | 11 #include "base/win/scoped_gdi_object.h" |
| 12 #include "base/win/scoped_hdc.h" | 12 #include "base/win/scoped_hdc.h" |
| 13 #include "base/win/scoped_select_object.h" | 13 #include "base/win/scoped_select_object.h" |
| 14 #include "chrome/common/print_messages.h" | 14 #include "chrome/common/print_messages.h" |
| 15 #include "printing/metafile.h" | 15 #include "printing/metafile.h" |
| 16 #include "printing/metafile_impl.h" | 16 #include "printing/metafile_impl.h" |
| 17 #include "printing/metafile_skia_wrapper.h" | 17 #include "printing/metafile_skia_wrapper.h" |
| 18 #include "printing/page_size_margins.h" | 18 #include "printing/page_size_margins.h" |
| 19 #include "printing/units.h" | 19 #include "printing/units.h" |
| 20 #include "skia/ext/platform_device.h" | 20 #include "skia/ext/platform_device.h" |
| 21 #include "skia/ext/refptr.h" | 21 #include "skia/ext/refptr.h" |
| 22 #include "skia/ext/vector_canvas.h" | 22 #include "skia/ext/vector_canvas.h" |
| 23 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 23 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 24 #include "ui/gfx/gdi_util.h" | 24 #include "ui/gfx/gdi_util.h" |
| 25 #include "ui/gfx/point.h" | 25 #include "ui/gfx/geometry/point.h" |
| 26 #include "ui/gfx/rect.h" | 26 #include "ui/gfx/rect.h" |
| 27 #include "ui/gfx/size.h" | 27 #include "ui/gfx/size.h" |
| 28 | 28 |
| 29 namespace printing { | 29 namespace printing { |
| 30 | 30 |
| 31 using blink::WebFrame; | 31 using blink::WebFrame; |
| 32 | 32 |
| 33 void PrintWebViewHelper::PrintPageInternal( | 33 void PrintWebViewHelper::PrintPageInternal( |
| 34 const PrintMsg_PrintPage_Params& params, | 34 const PrintMsg_PrintPage_Params& params, |
| 35 const gfx::Size& canvas_size, | 35 const gfx::Size& canvas_size, |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 } | 240 } |
| 241 shared_buf.GiveToProcess(base::GetCurrentProcessHandle(), shared_mem_handle); | 241 shared_buf.GiveToProcess(base::GetCurrentProcessHandle(), shared_mem_handle); |
| 242 shared_buf.Unmap(); | 242 shared_buf.Unmap(); |
| 243 | 243 |
| 244 Send(new PrintHostMsg_DuplicateSection(routing_id(), *shared_mem_handle, | 244 Send(new PrintHostMsg_DuplicateSection(routing_id(), *shared_mem_handle, |
| 245 shared_mem_handle)); | 245 shared_mem_handle)); |
| 246 return true; | 246 return true; |
| 247 } | 247 } |
| 248 | 248 |
| 249 } // namespace printing | 249 } // namespace printing |
| OLD | NEW |