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 "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 "chrome/common/print_messages.h" | 9 #include "components/printing/common/print_messages.h" |
10 #include "content/public/renderer/render_thread.h" | 10 #include "content/public/renderer/render_thread.h" |
11 #include "printing/metafile_skia_wrapper.h" | 11 #include "printing/metafile_skia_wrapper.h" |
12 #include "printing/page_size_margins.h" | 12 #include "printing/page_size_margins.h" |
13 #include "printing/pdf_metafile_skia.h" | 13 #include "printing/pdf_metafile_skia.h" |
14 #include "skia/ext/platform_device.h" | 14 #include "skia/ext/platform_device.h" |
15 #include "skia/ext/vector_canvas.h" | 15 #include "skia/ext/vector_canvas.h" |
16 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 16 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
17 | 17 |
18 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) | 18 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
19 #include "base/process/process_handle.h" | 19 #include "base/process/process_handle.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 RenderPageContent(frame, params.page_number, canvas_area, content_area, | 183 RenderPageContent(frame, params.page_number, canvas_area, content_area, |
184 scale_factor, canvas); | 184 scale_factor, canvas); |
185 | 185 |
186 // Done printing. Close the canvas to retrieve the compiled metafile. | 186 // Done printing. Close the canvas to retrieve the compiled metafile. |
187 if (!metafile->FinishPage()) | 187 if (!metafile->FinishPage()) |
188 NOTREACHED() << "metafile failed"; | 188 NOTREACHED() << "metafile failed"; |
189 } | 189 } |
190 | 190 |
191 } // namespace printing | 191 } // namespace printing |
OLD | NEW |