| OLD | NEW |
| 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 "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/process_util.h" | 8 #include "base/process_util.h" |
| 9 #include "chrome/common/render_messages.h" | 9 #include "chrome/common/render_messages.h" |
| 10 #include "chrome/common/render_messages_params.h" | 10 #include "content/common/view_messages.h" |
| 11 #include "printing/native_metafile_factory.h" | 11 #include "printing/native_metafile_factory.h" |
| 12 #include "printing/native_metafile.h" | 12 #include "printing/native_metafile.h" |
| 13 #include "printing/units.h" | 13 #include "printing/units.h" |
| 14 #include "skia/ext/vector_canvas.h" | 14 #include "skia/ext/vector_canvas.h" |
| 15 #include "skia/ext/vector_platform_device.h" | 15 #include "skia/ext/vector_platform_device.h" |
| 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 17 #include "ui/gfx/gdi_util.h" | 17 #include "ui/gfx/gdi_util.h" |
| 18 #include "ui/gfx/point.h" | 18 #include "ui/gfx/point.h" |
| 19 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
| 20 #include "ui/gfx/size.h" | 20 #include "ui/gfx/size.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 // Copy the bits into shared memory. | 304 // Copy the bits into shared memory. |
| 305 if (!metafile->GetData(shared_buf.memory(), buf_size)) { | 305 if (!metafile->GetData(shared_buf.memory(), buf_size)) { |
| 306 NOTREACHED() << "GetData() failed"; | 306 NOTREACHED() << "GetData() failed"; |
| 307 shared_buf.Unmap(); | 307 shared_buf.Unmap(); |
| 308 return false; | 308 return false; |
| 309 } | 309 } |
| 310 shared_buf.GiveToProcess(base::GetCurrentProcessHandle(), shared_mem_handle); | 310 shared_buf.GiveToProcess(base::GetCurrentProcessHandle(), shared_mem_handle); |
| 311 shared_buf.Unmap(); | 311 shared_buf.Unmap(); |
| 312 return true; | 312 return true; |
| 313 } | 313 } |
| OLD | NEW |