| 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 #ifndef CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_ | 5 #ifndef CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_ |
| 6 #define CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_ | 6 #define CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "skia/ext/SkFontHost_fontconfig_impl.h" | 9 #include "skia/ext/SkFontHost_fontconfig_impl.h" |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 namespace content { |
| 14 |
| 13 // FontConfig implementation for Skia that proxies out of process to get out | 15 // FontConfig implementation for Skia that proxies out of process to get out |
| 14 // of the sandbox. See http://code.google.com/p/chromium/wiki/LinuxSandboxIPC | 16 // of the sandbox. See http://code.google.com/p/chromium/wiki/LinuxSandboxIPC |
| 15 class FontConfigIPC : public FontConfigInterface { | 17 class FontConfigIPC : public FontConfigInterface { |
| 16 public: | 18 public: |
| 17 explicit FontConfigIPC(int fd); | 19 explicit FontConfigIPC(int fd); |
| 18 virtual ~FontConfigIPC(); | 20 virtual ~FontConfigIPC(); |
| 19 | 21 |
| 20 // FontConfigInterface implementation. | 22 // FontConfigInterface implementation. |
| 21 virtual bool Match(std::string* result_family, | 23 virtual bool Match(std::string* result_family, |
| 22 unsigned* result_filefaceid, | 24 unsigned* result_filefaceid, |
| 23 bool filefaceid_valid, | 25 bool filefaceid_valid, |
| 24 unsigned filefaceid, | 26 unsigned filefaceid, |
| 25 const std::string& family, | 27 const std::string& family, |
| 26 const void* characters, | 28 const void* characters, |
| 27 size_t characters_bytes, | 29 size_t characters_bytes, |
| 28 bool* is_bold, bool* is_italic) OVERRIDE; | 30 bool* is_bold, bool* is_italic) OVERRIDE; |
| 29 virtual int Open(unsigned filefaceid) OVERRIDE; | 31 virtual int Open(unsigned filefaceid) OVERRIDE; |
| 30 | 32 |
| 31 enum Method { | 33 enum Method { |
| 32 METHOD_MATCH = 0, | 34 METHOD_MATCH = 0, |
| 33 METHOD_OPEN = 1, | 35 METHOD_OPEN = 1, |
| 34 }; | 36 }; |
| 35 | 37 |
| 36 private: | 38 private: |
| 37 const int fd_; | 39 const int fd_; |
| 38 }; | 40 }; |
| 39 | 41 |
| 42 } // namespace content |
| 43 |
| 40 #endif // CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_ | 44 #endif // CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_ |
| OLD | NEW |