Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: chrome/renderer/pepper/pepper_flash_font_file_host.cc

Issue 1142313002: PDF: On Linux, convert font names to UTF-8 if needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pdf/pdfium/pdfium_engine.cc » ('j') | pdf/pdfium/pdfium_engine.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "build/build_config.h" 7 #include "build/build_config.h"
8 #include "content/public/renderer/renderer_ppapi_host.h" 8 #include "content/public/renderer/renderer_ppapi_host.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/host/dispatch_host_message.h" 10 #include "ppapi/host/dispatch_host_message.h"
11 #include "ppapi/host/host_message_context.h" 11 #include "ppapi/host/host_message_context.h"
12 #include "ppapi/host/ppapi_host.h" 12 #include "ppapi/host/ppapi_host.h"
13 #include "ppapi/proxy/ppapi_messages.h" 13 #include "ppapi/proxy/ppapi_messages.h"
14 #include "ppapi/proxy/serialized_structs.h" 14 #include "ppapi/proxy/serialized_structs.h"
15 15
16 #if defined(OS_LINUX) || defined(OS_OPENBSD) 16 #if defined(OS_LINUX) || defined(OS_OPENBSD)
17 #include "content/public/common/child_process_sandbox_support_linux.h" 17 #include "content/public/common/child_process_sandbox_support_linux.h"
18 #endif 18 #endif
19 19
20 PepperFlashFontFileHost::PepperFlashFontFileHost( 20 PepperFlashFontFileHost::PepperFlashFontFileHost(
21 content::RendererPpapiHost* host, 21 content::RendererPpapiHost* host,
22 PP_Instance instance, 22 PP_Instance instance,
23 PP_Resource resource, 23 PP_Resource resource,
24 const ppapi::proxy::SerializedFontDescription& description, 24 const ppapi::proxy::SerializedFontDescription& description,
25 PP_PrivateFontCharset charset) 25 PP_PrivateFontCharset charset)
26 : ResourceHost(host->GetPpapiHost(), instance, resource) { 26 : ResourceHost(host->GetPpapiHost(), instance, resource) {
27 #if defined(OS_LINUX) || defined(OS_OPENBSD) 27 #if defined(OS_LINUX) || defined(OS_OPENBSD)
28 fd_.reset(content::MatchFontWithFallback( 28 fd_.reset(content::MatchFontWithFallback(
29 description.face.c_str(), 29 description.face,
30 description.weight >= PP_BROWSERFONT_TRUSTED_WEIGHT_BOLD, 30 description.weight >= PP_BROWSERFONT_TRUSTED_WEIGHT_BOLD,
31 description.italic, 31 description.italic,
32 charset, 32 charset,
33 PP_BROWSERFONT_TRUSTED_FAMILY_DEFAULT)); 33 PP_BROWSERFONT_TRUSTED_FAMILY_DEFAULT));
34 #endif // defined(OS_LINUX) || defined(OS_OPENBSD) 34 #endif // defined(OS_LINUX) || defined(OS_OPENBSD)
35 } 35 }
36 36
37 PepperFlashFontFileHost::~PepperFlashFontFileHost() {} 37 PepperFlashFontFileHost::~PepperFlashFontFileHost() {}
38 38
39 int32_t PepperFlashFontFileHost::OnResourceMessageReceived( 39 int32_t PepperFlashFontFileHost::OnResourceMessageReceived(
(...skipping 25 matching lines...) Expand all
65 } else { 65 } else {
66 contents.clear(); 66 contents.clear();
67 } 67 }
68 } 68 }
69 } 69 }
70 #endif // defined(OS_LINUX) || defined(OS_OPENBSD) 70 #endif // defined(OS_LINUX) || defined(OS_OPENBSD)
71 71
72 context->reply_msg = PpapiPluginMsg_FlashFontFile_GetFontTableReply(contents); 72 context->reply_msg = PpapiPluginMsg_FlashFontFile_GetFontTableReply(contents);
73 return result; 73 return result;
74 } 74 }
OLDNEW
« no previous file with comments | « no previous file | pdf/pdfium/pdfium_engine.cc » ('j') | pdf/pdfium/pdfium_engine.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698