| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_COMMON_FONT_CONFIG_IPC_LINUX_H_ | |
| 6 #define CHROME_COMMON_FONT_CONFIG_IPC_LINUX_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "skia/ext/SkFontHost_fontconfig_impl.h" | |
| 10 | |
| 11 #include <string> | |
| 12 | |
| 13 // 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 | |
| 15 class FontConfigIPC : public FontConfigInterface { | |
| 16 public: | |
| 17 explicit FontConfigIPC(int fd); | |
| 18 ~FontConfigIPC(); | |
| 19 | |
| 20 // FontConfigInterface implementation. | |
| 21 virtual bool Match(std::string* result_family, | |
| 22 unsigned* result_filefaceid, | |
| 23 bool filefaceid_valid, | |
| 24 unsigned filefaceid, | |
| 25 const std::string& family, | |
| 26 const void* characters, | |
| 27 size_t characters_bytes, | |
| 28 bool* is_bold, bool* is_italic); | |
| 29 virtual int Open(unsigned filefaceid); | |
| 30 | |
| 31 enum Method { | |
| 32 METHOD_MATCH = 0, | |
| 33 METHOD_OPEN = 1, | |
| 34 }; | |
| 35 | |
| 36 private: | |
| 37 const int fd_; | |
| 38 }; | |
| 39 | |
| 40 #endif // CHROME_COMMON_FONT_CONFIG_IPC_LINUX_H_ | |
| OLD | NEW |