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