Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: chrome/renderer/renderer_sandbox_support_linux.h

Issue 6592065: Pass around preferred language to font fallback selection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the reference bug number of webkit bugzilla in comments. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/renderer_main.cc ('k') | chrome/renderer/renderer_sandbox_support_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_RENDERER_RENDERER_SANDBOX_SUPPORT_LINUX_H_ 5 #ifndef CHROME_RENDERER_RENDERER_SANDBOX_SUPPORT_LINUX_H_
6 #define CHROME_RENDERER_RENDERER_SANDBOX_SUPPORT_LINUX_H_ 6 #define CHROME_RENDERER_RENDERER_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 renderer_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 // 24 //
24 // 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
25 // satisfied. 26 // satisfied.
26 std::string getFontFamilyForCharacters(const uint16_t* utf16, size_t num_utf16); 27 std::string getFontFamilyForCharacters(const uint16_t* utf16,
28 size_t num_utf16,
29 const char* preferred_locale);
27 30
28 void getRenderStyleForStrike(const char* family, int sizeAndStyle, 31 void getRenderStyleForStrike(const char* family, int sizeAndStyle,
29 WebKit::WebFontRenderStyle* out); 32 WebKit::WebFontRenderStyle* out);
30 33
31 // Returns a file descriptor for a shared memory segment. 34 // Returns a file descriptor for a shared memory segment.
32 // The second argument is ignored because SHM segments are always 35 // The second argument is ignored because SHM segments are always
33 // mappable with PROT_EXEC on Linux. 36 // mappable with PROT_EXEC on Linux.
34 int MakeSharedMemorySegmentViaIPC(size_t length, bool executable); 37 int MakeSharedMemorySegmentViaIPC(size_t length, bool executable);
35 38
36 // Return a read-only file descriptor to the font which best matches the given 39 // Return a read-only file descriptor to the font which best matches the given
(...skipping 10 matching lines...) Expand all
47 // 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.
48 // output_length: size of output, if it's not 0. 51 // output_length: size of output, if it's not 0.
49 // 52 //
50 // returns: true on success. 53 // returns: true on success.
51 bool GetFontTable(int fd, uint32_t table, uint8_t* output, 54 bool GetFontTable(int fd, uint32_t table, uint8_t* output,
52 size_t* output_length); 55 size_t* output_length);
53 56
54 }; // namespace render_sandbox_support 57 }; // namespace render_sandbox_support
55 58
56 #endif // CHROME_RENDERER_RENDERER_SANDBOX_SUPPORT_LINUX_H_ 59 #endif // CHROME_RENDERER_RENDERER_SANDBOX_SUPPORT_LINUX_H_
OLDNEW
« no previous file with comments | « chrome/renderer/renderer_main.cc ('k') | chrome/renderer/renderer_sandbox_support_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698