OLD | NEW |
1 // Copyright (c) 2011 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_COMMON_CHILD_PROCESS_SANDBOX_SUPPORT_IMPL_LINUX_H_ | 5 #ifndef CONTENT_COMMON_CHILD_PROCESS_SANDBOX_SUPPORT_IMPL_LINUX_H_ |
6 #define CONTENT_COMMON_CHILD_PROCESS_SANDBOX_SUPPORT_IMPL_LINUX_H_ | 6 #define CONTENT_COMMON_CHILD_PROCESS_SANDBOX_SUPPORT_IMPL_LINUX_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include "base/global_descriptors_posix.h" |
| 10 #include "content/common/chrome_descriptors.h" |
9 #include "content/public/common/child_process_sandbox_support_linux.h" | 11 #include "content/public/common/child_process_sandbox_support_linux.h" |
10 | 12 |
11 namespace WebKit { | 13 namespace WebKit { |
12 struct WebFontFamily; | 14 struct WebFontFamily; |
13 struct WebFontRenderStyle; | 15 struct WebFontRenderStyle; |
14 } | 16 } |
15 | 17 |
16 namespace content { | 18 namespace content { |
17 | 19 |
18 // Return a font family which provides glyphs for the Unicode code points | 20 // Return a font family which provides glyphs for the Unicode code points |
19 // specified by |utf16| | 21 // specified by |utf16| |
20 // utf16: a native-endian UTF16 string | 22 // utf16: a native-endian UTF16 string |
21 // num_utf16: the number of 16-bit words in |utf16| | 23 // num_utf16: the number of 16-bit words in |utf16| |
22 // preferred_locale: preferred locale identifier for the |utf16| | 24 // preferred_locale: preferred locale identifier for the |utf16| |
23 // | 25 // |
24 // Returns: a font family instance. | 26 // Returns: a font family instance. |
25 // The instance has an empty font name if the request could not be satisfied. | 27 // The instance has an empty font name if the request could not be satisfied. |
26 void GetFontFamilyForCharacters(const uint16_t* utf16, | 28 void GetFontFamilyForCharacters(const uint16_t* utf16, |
27 size_t num_utf16, | 29 size_t num_utf16, |
28 const char* preferred_locale, | 30 const char* preferred_locale, |
29 WebKit::WebFontFamily* family); | 31 WebKit::WebFontFamily* family); |
30 | 32 |
31 void GetRenderStyleForStrike(const char* family, int sizeAndStyle, | 33 void GetRenderStyleForStrike(const char* family, int sizeAndStyle, |
32 WebKit::WebFontRenderStyle* out); | 34 WebKit::WebFontRenderStyle* out); |
33 | 35 |
| 36 inline int GetSandboxFD() { |
| 37 return kSandboxIPCChannel + base::GlobalDescriptors::kBaseDescriptor; |
| 38 } |
| 39 |
34 }; // namespace content | 40 }; // namespace content |
35 | 41 |
36 #endif // CONTENT_COMMON_CHILD_PROCESS_SANDBOX_SUPPORT_IMPL_LINUX_H_ | 42 #endif // CONTENT_COMMON_CHILD_PROCESS_SANDBOX_SUPPORT_IMPL_LINUX_H_ |
OLD | NEW |