OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_RENDERER_SANDBOX_SUPPORT_LINUX_H_ | 5 #ifndef CONTENT_COMMON_CHILD_PROCESS_SANDBOX_SUPPORT_LINUX_H_ |
6 #define CONTENT_RENDERER_RENDERER_SANDBOX_SUPPORT_LINUX_H_ | 6 #define CONTENT_COMMON_CHILD_PROCESS_SANDBOX_SUPPORT_LINUX_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 namespace WebKit { | 13 namespace WebKit { |
14 struct WebFontRenderStyle; | 14 struct WebFontRenderStyle; |
15 } | 15 } |
16 | 16 |
17 namespace renderer_sandbox_support { | 17 namespace child_process_sandbox_support { |
18 | 18 |
19 // Return a font family which provides glyphs for the Unicode code points | 19 // Return a font family which provides glyphs for the Unicode code points |
20 // specified by |utf16| | 20 // specified by |utf16| |
21 // utf16: a native-endian UTF16 string | 21 // utf16: a native-endian UTF16 string |
22 // num_utf16: the number of 16-bit words in |utf16| | 22 // num_utf16: the number of 16-bit words in |utf16| |
23 // preferred_locale: preferred locale identifier for the |utf16| | 23 // preferred_locale: preferred locale identifier for the |utf16| |
24 // | 24 // |
25 // Returns: the font family or an empty string if the request could not be | 25 // Returns: the font family or an empty string if the request could not be |
26 // satisfied. | 26 // satisfied. |
27 std::string getFontFamilyForCharacters(const uint16_t* utf16, | 27 std::string getFontFamilyForCharacters(const uint16_t* utf16, |
(...skipping 19 matching lines...) Expand all Loading... |
47 // fd: a file descriptor to the SFNT file. The position doesn't matter. | 47 // fd: a file descriptor to the SFNT file. The position doesn't matter. |
48 // table: the table in *big-endian* format, or 0 for the whole font file. | 48 // table: the table in *big-endian* format, or 0 for the whole font file. |
49 // output: a buffer of size output_length that gets the data. can be 0, in | 49 // output: a buffer of size output_length that gets the data. can be 0, in |
50 // which case output_length will be set to the required size in bytes. | 50 // which case output_length will be set to the required size in bytes. |
51 // output_length: size of output, if it's not 0. | 51 // output_length: size of output, if it's not 0. |
52 // | 52 // |
53 // returns: true on success. | 53 // returns: true on success. |
54 bool GetFontTable(int fd, uint32_t table, uint8_t* output, | 54 bool GetFontTable(int fd, uint32_t table, uint8_t* output, |
55 size_t* output_length); | 55 size_t* output_length); |
56 | 56 |
57 }; // namespace render_sandbox_support | 57 }; // namespace child_process_sandbox_support |
58 | 58 |
59 #endif // CONTENT_RENDERER_RENDERER_SANDBOX_SUPPORT_LINUX_H_ | 59 #endif // CONTENT_COMMON_CHILD_PROCESS_SANDBOX_SUPPORT_LINUX_H_ |
OLD | NEW |