| 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/pepper_flash_font_file_host.h" | 5 #include "chrome/renderer/pepper/pepper_flash_font_file_host.h" |
| 6 | 6 |
| 7 #include "base/sys_byteorder.h" | 7 #include "base/sys_byteorder.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "content/public/renderer/renderer_ppapi_host.h" | 9 #include "content/public/renderer/renderer_ppapi_host.h" |
| 10 #include "ppapi/c/pp_errors.h" | 10 #include "ppapi/c/pp_errors.h" |
| 11 #include "ppapi/host/dispatch_host_message.h" | 11 #include "ppapi/host/dispatch_host_message.h" |
| 12 #include "ppapi/host/host_message_context.h" | 12 #include "ppapi/host/host_message_context.h" |
| 13 #include "ppapi/host/ppapi_host.h" | 13 #include "ppapi/host/ppapi_host.h" |
| 14 #include "ppapi/proxy/ppapi_messages.h" | 14 #include "ppapi/proxy/ppapi_messages.h" |
| 15 #include "ppapi/proxy/serialized_structs.h" | 15 #include "ppapi/proxy/serialized_structs.h" |
| 16 | 16 |
| 17 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 17 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| 18 #include "content/public/common/child_process_sandbox_support_linux.h" | 18 #include "content/public/child/child_process_sandbox_support_linux.h" |
| 19 #include "content/public/common/common_sandbox_support_linux.h" |
| 19 #elif defined(OS_WIN) | 20 #elif defined(OS_WIN) |
| 20 #include "third_party/skia/include/ports/SkFontMgr.h" | 21 #include "third_party/skia/include/ports/SkFontMgr.h" |
| 21 #endif | 22 #endif |
| 22 | 23 |
| 23 PepperFlashFontFileHost::PepperFlashFontFileHost( | 24 PepperFlashFontFileHost::PepperFlashFontFileHost( |
| 24 content::RendererPpapiHost* host, | 25 content::RendererPpapiHost* host, |
| 25 PP_Instance instance, | 26 PP_Instance instance, |
| 26 PP_Resource resource, | 27 PP_Resource resource, |
| 27 const ppapi::proxy::SerializedFontDescription& description, | 28 const ppapi::proxy::SerializedFontDescription& description, |
| 28 PP_PrivateFontCharset charset) | 29 PP_PrivateFontCharset charset) |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 reinterpret_cast<uint8_t*>(const_cast<char*>(contents.c_str())); | 98 reinterpret_cast<uint8_t*>(const_cast<char*>(contents.c_str())); |
| 98 if (GetFontData(table, contents_ptr, &length)) { | 99 if (GetFontData(table, contents_ptr, &length)) { |
| 99 result = PP_OK; | 100 result = PP_OK; |
| 100 } else { | 101 } else { |
| 101 contents.clear(); | 102 contents.clear(); |
| 102 } | 103 } |
| 103 } | 104 } |
| 104 context->reply_msg = PpapiPluginMsg_FlashFontFile_GetFontTableReply(contents); | 105 context->reply_msg = PpapiPluginMsg_FlashFontFile_GetFontTableReply(contents); |
| 105 return result; | 106 return result; |
| 106 } | 107 } |
| OLD | NEW |