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 "base/containers/mru_cache.h" | 9 #include "base/containers/mru_cache.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 }; | 27 }; |
28 | 28 |
29 // FontConfig implementation for Skia that proxies out of process to get out | 29 // FontConfig implementation for Skia that proxies out of process to get out |
30 // of the sandbox. See https://chromium.googlesource.com/chromium/src/+/master/d
ocs/linux_sandbox_ipc.md | 30 // of the sandbox. See https://chromium.googlesource.com/chromium/src/+/master/d
ocs/linux_sandbox_ipc.md |
31 class FontConfigIPC : public SkFontConfigInterface { | 31 class FontConfigIPC : public SkFontConfigInterface { |
32 public: | 32 public: |
33 explicit FontConfigIPC(int fd); | 33 explicit FontConfigIPC(int fd); |
34 ~FontConfigIPC() override; | 34 ~FontConfigIPC() override; |
35 | 35 |
36 bool matchFamilyName(const char familyName[], | 36 bool matchFamilyName(const char familyName[], |
37 SkTypeface::Style requested, | 37 SkFontStyle requested, |
38 FontIdentity* outFontIdentifier, | 38 FontIdentity* outFontIdentifier, |
39 SkString* outFamilyName, | 39 SkString* outFamilyName, |
40 SkTypeface::Style* outStyle) override; | 40 SkFontStyle* outStyle) override; |
41 | 41 |
42 // Returns a new SkTypeface instance or a ref'ed one from the cache. The | 42 // Returns a new SkTypeface instance or a ref'ed one from the cache. The |
43 // caller should adopt the pointer. | 43 // caller should adopt the pointer. |
44 SkTypeface* createTypeface(const FontIdentity& identity) override | 44 SkTypeface* createTypeface(const FontIdentity& identity) override |
45 WARN_UNUSED_RESULT; | 45 WARN_UNUSED_RESULT; |
46 | 46 |
47 enum Method { | 47 enum Method { |
48 METHOD_MATCH = 0, | 48 METHOD_MATCH = 0, |
49 METHOD_OPEN = 1, | 49 METHOD_OPEN = 1, |
50 }; | 50 }; |
(...skipping 23 matching lines...) Expand all Loading... |
74 skia::RefPtr<SkTypeface>, | 74 skia::RefPtr<SkTypeface>, |
75 SkFontConfigInterfaceFontIdentityHash> | 75 SkFontConfigInterfaceFontIdentityHash> |
76 mapped_typefaces_; | 76 mapped_typefaces_; |
77 | 77 |
78 DISALLOW_COPY_AND_ASSIGN(FontConfigIPC); | 78 DISALLOW_COPY_AND_ASSIGN(FontConfigIPC); |
79 }; | 79 }; |
80 | 80 |
81 } // namespace content | 81 } // namespace content |
82 | 82 |
83 #endif // CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_ | 83 #endif // CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_ |
OLD | NEW |