| 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/file_descriptor_posix.h" | 7 #include "base/file_descriptor_posix.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 // The scale factor on Linux is 1. | 214 // The scale factor on Linux is 1. |
| 215 PrintHeaderAndFooter(canvas.get(), params.page_number + 1, | 215 PrintHeaderAndFooter(canvas.get(), params.page_number + 1, |
| 216 print_preview_context_.total_page_count(), 1, | 216 print_preview_context_.total_page_count(), 1, |
| 217 page_layout_in_points, *header_footer_info_); | 217 page_layout_in_points, *header_footer_info_); |
| 218 } | 218 } |
| 219 | 219 |
| 220 // Done printing. Close the device context to retrieve the compiled metafile. | 220 // Done printing. Close the device context to retrieve the compiled metafile. |
| 221 if (!metafile->FinishPage()) | 221 if (!metafile->FinishPage()) |
| 222 NOTREACHED() << "metafile failed"; | 222 NOTREACHED() << "metafile failed"; |
| 223 } | 223 } |
| 224 |
| 225 #if defined(USE_SKIA) |
| 226 // static |
| 227 bool PrintWebViewHelper::ConvertTextToGlyphs(SkTypeface* typeface, |
| 228 const string16& text, |
| 229 std::vector<uint16_t>* glyphs) { |
| 230 // TODO(arthurhsu): provide fix for Linux. |
| 231 return false; |
| 232 } |
| 233 #endif |
| OLD | NEW |