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

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

Issue 4810002: NaCl: Remove second variant of MakeSharedMemorySegmentViaIPC() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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
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
(...skipping 11 matching lines...) Expand all
22 // num_utf16: the number of 16-bit words in |utf16| 22 // num_utf16: the number of 16-bit words in |utf16|
23 // 23 //
24 // Returns: the font family or an empty string if the request could not be 24 // Returns: the font family or an empty string if the request could not be
25 // satisfied. 25 // satisfied.
26 std::string getFontFamilyForCharacters(const uint16_t* utf16, size_t num_utf16); 26 std::string getFontFamilyForCharacters(const uint16_t* utf16, size_t num_utf16);
27 27
28 void getRenderStyleForStrike(const char* family, int sizeAndStyle, 28 void getRenderStyleForStrike(const char* family, int sizeAndStyle,
29 WebKit::WebFontRenderStyle* out); 29 WebKit::WebFontRenderStyle* out);
30 30
31 // Returns a file descriptor for a shared memory segment. 31 // Returns a file descriptor for a shared memory segment.
32 // TODO(mseaborn): Remove this when the call site is gone from native_client.
33 int MakeSharedMemorySegmentViaIPC(size_t length);
34
35 // Returns a file descriptor for a shared memory segment.
36 // The second argument is ignored because SHM segments are always 32 // The second argument is ignored because SHM segments are always
37 // mappable with PROT_EXEC on Linux. 33 // mappable with PROT_EXEC on Linux.
38 int MakeSharedMemorySegmentViaIPCExecutable(size_t length, bool executable); 34 int MakeSharedMemorySegmentViaIPC(size_t length, bool executable);
39 35
40 // Return a read-only file descriptor to the font which best matches the given 36 // Return a read-only file descriptor to the font which best matches the given
41 // properties or -1 on failure. 37 // properties or -1 on failure.
42 // charset: specifies the language(s) that the font must cover. See 38 // charset: specifies the language(s) that the font must cover. See
43 // render_sandbox_host_linux.cc for more information. 39 // render_sandbox_host_linux.cc for more information.
44 int MatchFontWithFallback(const std::string& face, bool bold, 40 int MatchFontWithFallback(const std::string& face, bool bold,
45 bool italic, int charset); 41 bool italic, int charset);
46 42
47 // GetFontTable loads a specified font table from an open SFNT file. 43 // GetFontTable loads a specified font table from an open SFNT file.
48 // fd: a file descriptor to the SFNT file. The position doesn't matter. 44 // fd: a file descriptor to the SFNT file. The position doesn't matter.
49 // table: the table in *big-endian* format, or 0 for the whole font file. 45 // table: the table in *big-endian* format, or 0 for the whole font file.
50 // output: a buffer of size output_length that gets the data. can be 0, in 46 // output: a buffer of size output_length that gets the data. can be 0, in
51 // which case output_length will be set to the required size in bytes. 47 // which case output_length will be set to the required size in bytes.
52 // output_length: size of output, if it's not 0. 48 // output_length: size of output, if it's not 0.
53 // 49 //
54 // returns: true on success. 50 // returns: true on success.
55 bool GetFontTable(int fd, uint32_t table, uint8_t* output, 51 bool GetFontTable(int fd, uint32_t table, uint8_t* output,
56 size_t* output_length); 52 size_t* output_length);
57 53
58 }; // namespace render_sandbox_support 54 }; // namespace render_sandbox_support
59 55
60 #endif // CHROME_RENDERER_RENDERER_SANDBOX_SUPPORT_LINUX_H_ 56 #endif // CHROME_RENDERER_RENDERER_SANDBOX_SUPPORT_LINUX_H_
OLDNEW
« no previous file with comments | « chrome/renderer/render_process_impl.cc ('k') | chrome/renderer/renderer_sandbox_support_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698