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

Side by Side Diff: content/common/font_config_ipc_linux.h

Issue 12764009: re-land 187283 -- switch to skia's version of SkFontHost_fontconfig (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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 #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 "third_party/skia/include/ports/SkFontConfigInterface.h"
10 10
11 #include <string> 11 #include <string>
12 12
13 namespace content { 13 namespace content {
14 14
15 // 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
16 // 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
17 class FontConfigIPC : public FontConfigInterface { 17 class FontConfigIPC : public SkFontConfigInterface {
18 public: 18 public:
19 explicit FontConfigIPC(int fd); 19 explicit FontConfigIPC(int fd);
20 virtual ~FontConfigIPC(); 20 virtual ~FontConfigIPC();
21 21
22 // FontConfigInterface implementation. 22 virtual bool matchFamilyName(const char familyName[],
23 virtual bool Match(std::string* result_family, 23 SkTypeface::Style requested,
24 unsigned* result_filefaceid, 24 FontIdentity* outFontIdentifier,
25 bool filefaceid_valid, 25 SkString* outFamilyName,
26 unsigned filefaceid, 26 SkTypeface::Style* outStyle) OVERRIDE;
27 const std::string& family, 27
28 const void* characters, 28 virtual SkStream* openStream(const FontIdentity&) OVERRIDE;
29 size_t characters_bytes,
30 bool* is_bold, bool* is_italic) OVERRIDE;
31 virtual int Open(unsigned filefaceid) OVERRIDE;
32 29
33 enum Method { 30 enum Method {
34 METHOD_MATCH = 0, 31 METHOD_MATCH = 0,
35 METHOD_OPEN = 1, 32 METHOD_OPEN = 1,
36 }; 33 };
37 34
35 enum {
36 kMaxFontFamilyLength = 2048
37 };
38
38 private: 39 private:
39 const int fd_; 40 const int fd_;
40 }; 41 };
41 42
42 } // namespace content 43 } // namespace content
43 44
44 #endif // CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_ 45 #endif // CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_sandbox_host_linux.cc ('k') | content/common/font_config_ipc_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698