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

Side by Side Diff: content/common/child_process_sandbox_support_linux.cc

Issue 6981001: Make the Pepper proxy support in-process font rendering. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "content/renderer/renderer_sandbox_support_linux.h" 5 #include "content/common/child_process_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"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/pickle.h" 12 #include "base/pickle.h"
13 #include "content/common/chrome_descriptors.h" 13 #include "content/common/chrome_descriptors.h"
14 #include "content/common/sandbox_methods_linux.h" 14 #include "content/common/sandbox_methods_linux.h"
15 #include "content/common/unix_domain_socket_posix.h" 15 #include "content/common/unix_domain_socket_posix.h"
16
17 #include "third_party/WebKit/Source/WebKit/chromium/public/linux/WebFontRenderSt yle.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/linux/WebFontRenderSt yle.h"
18 17
19 static int GetSandboxFD() { 18 static int GetSandboxFD() {
20 return kSandboxIPCChannel + base::GlobalDescriptors::kBaseDescriptor; 19 return kSandboxIPCChannel + base::GlobalDescriptors::kBaseDescriptor;
21 } 20 }
22 21
23 namespace renderer_sandbox_support { 22 namespace child_process_sandbox_support {
24 23
25 std::string getFontFamilyForCharacters(const uint16_t* utf16, 24 std::string getFontFamilyForCharacters(const uint16_t* utf16,
26 size_t num_utf16, 25 size_t num_utf16,
27 const char* preferred_locale) { 26 const char* preferred_locale) {
28 Pickle request; 27 Pickle request;
29 request.WriteInt(LinuxSandbox::METHOD_GET_FONT_FAMILY_FOR_CHARS); 28 request.WriteInt(LinuxSandbox::METHOD_GET_FONT_FAMILY_FOR_CHARS);
30 request.WriteInt(num_utf16); 29 request.WriteInt(num_utf16);
31 for (size_t i = 0; i < num_utf16; ++i) 30 for (size_t i = 0; i < num_utf16; ++i)
32 request.WriteUInt32(utf16[i]); 31 request.WriteUInt32(utf16[i]);
33 request.WriteString(preferred_locale); 32 request.WriteString(preferred_locale);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return false; 178 return false;
180 179
181 *output_length = length; 180 *output_length = length;
182 n = HANDLE_EINTR(pread(fd, output, length, offset)); 181 n = HANDLE_EINTR(pread(fd, output, length, offset));
183 if (n != static_cast<ssize_t>(length)) 182 if (n != static_cast<ssize_t>(length))
184 return false; 183 return false;
185 184
186 return true; 185 return true;
187 } 186 }
188 187
189 } // namespace render_sandbox_support 188 } // namespace child_process_sandbox_support
OLDNEW
« no previous file with comments | « content/common/child_process_sandbox_support_linux.h ('k') | content/common/pepper_plugin_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698