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 #import <AppKit/AppKit.h> | 7 #import <AppKit/AppKit.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/mac/scoped_nsautorelease_pool.h" | 10 #include "base/mac/scoped_nsautorelease_pool.h" |
11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
12 #include "chrome/common/print_messages.h" | 12 #include "components/printing/common/print_messages.h" |
13 #include "printing/metafile_skia_wrapper.h" | 13 #include "printing/metafile_skia_wrapper.h" |
14 #include "printing/page_size_margins.h" | 14 #include "printing/page_size_margins.h" |
15 #include "skia/ext/platform_device.h" | 15 #include "skia/ext/platform_device.h" |
16 #include "skia/ext/vector_canvas.h" | 16 #include "skia/ext/vector_canvas.h" |
17 #include "third_party/WebKit/public/platform/WebCanvas.h" | 17 #include "third_party/WebKit/public/platform/WebCanvas.h" |
18 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 18 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
19 | 19 |
20 namespace printing { | 20 namespace printing { |
21 | 21 |
22 using blink::WebFrame; | 22 using blink::WebFrame; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 #endif // defined(ENABLE_PRINT_PREVIEW) | 136 #endif // defined(ENABLE_PRINT_PREVIEW) |
137 RenderPageContent(frame, page_number, canvas_area, content_area, | 137 RenderPageContent(frame, page_number, canvas_area, content_area, |
138 scale_factor, static_cast<blink::WebCanvas*>(canvas)); | 138 scale_factor, static_cast<blink::WebCanvas*>(canvas)); |
139 } | 139 } |
140 | 140 |
141 // Done printing. Close the device context to retrieve the compiled metafile. | 141 // Done printing. Close the device context to retrieve the compiled metafile. |
142 metafile->FinishPage(); | 142 metafile->FinishPage(); |
143 } | 143 } |
144 | 144 |
145 } // namespace printing | 145 } // namespace printing |
OLD | NEW |