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 "components/printing/renderer/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 "components/printing/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_canvas.h" |
16 #include "third_party/WebKit/public/platform/WebCanvas.h" | 16 #include "third_party/WebKit/public/platform/WebCanvas.h" |
17 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 17 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
18 | 18 |
19 namespace printing { | 19 namespace printing { |
20 | 20 |
21 using blink::WebFrame; | 21 using blink::WebFrame; |
22 | 22 |
23 void PrintWebViewHelper::PrintPageInternal( | 23 void PrintWebViewHelper::PrintPageInternal( |
24 const PrintMsg_PrintPage_Params& params, | 24 const PrintMsg_PrintPage_Params& params, |
25 WebFrame* frame) { | 25 WebFrame* frame) { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 #endif // defined(ENABLE_PRINT_PREVIEW) | 135 #endif // defined(ENABLE_PRINT_PREVIEW) |
136 RenderPageContent(frame, page_number, canvas_area, content_area, | 136 RenderPageContent(frame, page_number, canvas_area, content_area, |
137 scale_factor, static_cast<blink::WebCanvas*>(canvas)); | 137 scale_factor, static_cast<blink::WebCanvas*>(canvas)); |
138 } | 138 } |
139 | 139 |
140 // Done printing. Close the device context to retrieve the compiled metafile. | 140 // Done printing. Close the device context to retrieve the compiled metafile. |
141 metafile->FinishPage(); | 141 metafile->FinishPage(); |
142 } | 142 } |
143 | 143 |
144 } // namespace printing | 144 } // namespace printing |
OLD | NEW |