Chromium Code Reviews

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

Issue 2956002: Pepper v2 Font API browser implementation. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/renderer_sandbox_support_linux.h ('k') | webkit/glue/plugins/pepper_font.h » ('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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include "chrome/renderer/renderer_sandbox_support_linux.h" 5 #include "chrome/renderer/renderer_sandbox_support_linux.h"
6 6
7 #include <sys/stat.h> 7 #include <sys/stat.h>
8 8
9 #include "base/eintr_wrapper.h" 9 #include "base/eintr_wrapper.h"
10 #include "base/global_descriptors_posix.h" 10 #include "base/global_descriptors_posix.h"
(...skipping 75 matching lines...)
86 int result_fd; 86 int result_fd;
87 ssize_t result = base::SendRecvMsg(GetSandboxFD(), 87 ssize_t result = base::SendRecvMsg(GetSandboxFD(),
88 reply_buf, sizeof(reply_buf), 88 reply_buf, sizeof(reply_buf),
89 &result_fd, request); 89 &result_fd, request);
90 if (result == -1) 90 if (result == -1)
91 return -1; 91 return -1;
92 return result_fd; 92 return result_fd;
93 } 93 }
94 94
95 int MatchFontWithFallback(const std::string& face, bool bold, 95 int MatchFontWithFallback(const std::string& face, bool bold,
96 bool italic, NPCharset charset) { 96 bool italic, int charset) {
97 Pickle request; 97 Pickle request;
98 request.WriteInt(LinuxSandbox::METHOD_MATCH_WITH_FALLBACK); 98 request.WriteInt(LinuxSandbox::METHOD_MATCH_WITH_FALLBACK);
99 request.WriteString(face); 99 request.WriteString(face);
100 request.WriteBool(bold); 100 request.WriteBool(bold);
101 request.WriteBool(italic); 101 request.WriteBool(italic);
102 request.WriteUInt32(charset); 102 request.WriteUInt32(charset);
103 uint8_t reply_buf[64]; 103 uint8_t reply_buf[64];
104 int fd = -1; 104 int fd = -1;
105 base::SendRecvMsg(GetSandboxFD(), reply_buf, sizeof(reply_buf), 105 base::SendRecvMsg(GetSandboxFD(), reply_buf, sizeof(reply_buf),
106 &fd, request); 106 &fd, request);
(...skipping 71 matching lines...)
178 178
179 *output_length = length; 179 *output_length = length;
180 n = HANDLE_EINTR(pread(fd, output, length, offset)); 180 n = HANDLE_EINTR(pread(fd, output, length, offset));
181 if (n != static_cast<ssize_t>(length)) 181 if (n != static_cast<ssize_t>(length))
182 return false; 182 return false;
183 183
184 return true; 184 return true;
185 } 185 }
186 186
187 } // namespace render_sandbox_support 187 } // namespace render_sandbox_support
OLDNEW
« no previous file with comments | « chrome/renderer/renderer_sandbox_support_linux.h ('k') | webkit/glue/plugins/pepper_font.h » ('j') | no next file with comments »

Powered by Google App Engine