| 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/pepper/ppb_pdf_impl.h" | 5 #include "chrome/renderer/pepper/ppb_pdf_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 PrivateFontFile(PP_Instance instance, int fd) | 54 PrivateFontFile(PP_Instance instance, int fd) |
| 55 : Resource(ppapi::OBJECT_IS_IMPL, instance), | 55 : Resource(ppapi::OBJECT_IS_IMPL, instance), |
| 56 fd_(fd) { | 56 fd_(fd) { |
| 57 } | 57 } |
| 58 | 58 |
| 59 bool GetFontTable(uint32_t table, | 59 bool GetFontTable(uint32_t table, |
| 60 void* output, | 60 void* output, |
| 61 uint32_t* output_length) { | 61 uint32_t* output_length) { |
| 62 size_t temp_size = static_cast<size_t>(*output_length); | 62 size_t temp_size = static_cast<size_t>(*output_length); |
| 63 bool rv = content::GetFontTable( | 63 bool rv = content::GetFontTable( |
| 64 fd_, table, static_cast<uint8_t*>(output), &temp_size); | 64 fd_, table, static_cast<uint8_t*>(output), &temp_size, 0 /* offset */); |
| 65 *output_length = static_cast<uint32_t>(temp_size); | 65 *output_length = static_cast<uint32_t>(temp_size); |
| 66 return rv; | 66 return rv; |
| 67 } | 67 } |
| 68 | 68 |
| 69 protected: | 69 protected: |
| 70 virtual ~PrivateFontFile() {} | 70 virtual ~PrivateFontFile() {} |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 int fd_; | 73 int fd_; |
| 74 }; | 74 }; |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 WebKit::WebElement element = instance->container()->element(); | 419 WebKit::WebElement element = instance->container()->element(); |
| 420 WebKit::WebView* view = element.document().frame()->view(); | 420 WebKit::WebView* view = element.document().frame()->view(); |
| 421 content::RenderView* render_view = content::RenderView::FromWebView(view); | 421 content::RenderView* render_view = content::RenderView::FromWebView(view); |
| 422 | 422 |
| 423 using printing::PrintWebViewHelper; | 423 using printing::PrintWebViewHelper; |
| 424 PrintWebViewHelper* print_view_helper = PrintWebViewHelper::Get(render_view); | 424 PrintWebViewHelper* print_view_helper = PrintWebViewHelper::Get(render_view); |
| 425 if (print_view_helper) | 425 if (print_view_helper) |
| 426 print_view_helper->PrintNode(element); | 426 print_view_helper->PrintNode(element); |
| 427 #endif | 427 #endif |
| 428 } | 428 } |
| OLD | NEW |