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