diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-09 20:52:36 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-09 20:52:36 +0000 |
commit | 8ef13715896630c51f1926cfce8a67d7308c05b2 (patch) | |
tree | 82ca203f477243330bea49b1ce280518b01f2e86 /chrome/renderer | |
parent | 2ffc6f7dd40198a8f8f4445bf25be5cf2ebdafe1 (diff) | |
download | chromium_src-8ef13715896630c51f1926cfce8a67d7308c05b2.zip chromium_src-8ef13715896630c51f1926cfce8a67d7308c05b2.tar.gz chromium_src-8ef13715896630c51f1926cfce8a67d7308c05b2.tar.bz2 |
Pepper v2 Font API browser implementation.
Review URL: http://codereview.chromium.org/2956002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52009 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/renderer_glue.cc | 16 | ||||
-rw-r--r-- | chrome/renderer/renderer_sandbox_support_linux.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/renderer_sandbox_support_linux.h | 4 |
3 files changed, 18 insertions, 4 deletions
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc index d740c6e..849565a 100644 --- a/chrome/renderer/renderer_glue.cc +++ b/chrome/renderer/renderer_glue.cc @@ -39,6 +39,8 @@ #if defined(OS_WIN) #include <strsafe.h> // note: per msdn docs, this must *follow* other includes +#elif defined(OS_LINUX) +#include "chrome/renderer/renderer_sandbox_support_linux.h" #endif template <typename T, size_t stack_capacity> @@ -311,4 +313,18 @@ bool IsSingleProcess() { return CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); } +#if defined(OS_LINUX) +int MatchFontWithFallback(const std::string& face, bool bold, + bool italic, int charset) { + return renderer_sandbox_support::MatchFontWithFallback( + face, bold, italic, charset); +} + +bool GetFontTable(int fd, uint32_t table, uint8_t* output, + size_t* output_length) { + return renderer_sandbox_support::GetFontTable( + fd, table, output, output_length); +} +#endif + } // namespace webkit_glue diff --git a/chrome/renderer/renderer_sandbox_support_linux.cc b/chrome/renderer/renderer_sandbox_support_linux.cc index 4b02bbce..6733f75 100644 --- a/chrome/renderer/renderer_sandbox_support_linux.cc +++ b/chrome/renderer/renderer_sandbox_support_linux.cc @@ -93,7 +93,7 @@ int MakeSharedMemorySegmentViaIPC(size_t length) { } int MatchFontWithFallback(const std::string& face, bool bold, - bool italic, NPCharset charset) { + bool italic, int charset) { Pickle request; request.WriteInt(LinuxSandbox::METHOD_MATCH_WITH_FALLBACK); request.WriteString(face); diff --git a/chrome/renderer/renderer_sandbox_support_linux.h b/chrome/renderer/renderer_sandbox_support_linux.h index 098c46e..5f216f1 100644 --- a/chrome/renderer/renderer_sandbox_support_linux.h +++ b/chrome/renderer/renderer_sandbox_support_linux.h @@ -9,8 +9,6 @@ #include <string> -#include "third_party/npapi/bindings/npapi_extensions.h" - namespace WebKit { struct WebFontRenderStyle; } @@ -37,7 +35,7 @@ int MakeSharedMemorySegmentViaIPC(size_t length); // charset: specifies the language(s) that the font must cover. See // render_sandbox_host_linux.cc for more information. int MatchFontWithFallback(const std::string& face, bool bold, - bool italic, NPCharset charset); + bool italic, int charset); // GetFontTable loads a specified font table from an open SFNT file. // fd: a file descriptor to the SFNT file. The position doesn't matter. |