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_CHILD_PROCESS_SANDBOX_SUPPORT_IMPL_LINUX_H_
6 #define CONTENT_COMMON_CHILD_PROCESS_SANDBOX_SUPPORT_IMPL_LINUX_H_
8 #include "base/posix/global_descriptors.h"
9 #include "content/public/common/child_process_sandbox_support_linux.h"
10 #include "content/public/common/content_descriptors.h"
13 struct WebFallbackFont
;
14 struct WebFontRenderStyle
;
19 // Returns a font family which provides glyphs for the Unicode code point
20 // specified by |character|, a UTF-32 character. |preferred_locale| contains the
21 // preferred locale identifier for |character|. The instance has an empty font
22 // name if the request could not be satisfied.
23 void GetFallbackFontForCharacter(const int32_t character
,
24 const char* preferred_locale
,
25 blink::WebFallbackFont
* family
);
27 // Returns rendering settings for a provided font family, size, and style.
28 // |size_and_style| stores the bold setting in its least-significant bit, the
29 // italic setting in its second-least-significant bit, and holds the requested
30 // size in pixels into its remaining bits.
31 // TODO(derat): Update WebSandboxSupport's getRenderStyleForStrike() method to
32 // pass the style and size separately instead of packing them into an int.
33 void GetRenderStyleForStrike(const char* family
,
35 blink::WebFontRenderStyle
* out
);
37 inline int GetSandboxFD() {
38 return kSandboxIPCChannel
+ base::GlobalDescriptors::kBaseDescriptor
;
41 }; // namespace content
43 #endif // CONTENT_COMMON_CHILD_PROCESS_SANDBOX_SUPPORT_IMPL_LINUX_H_