| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/renderer_host/sandbox_ipc_linux.h" | 5 #include "content/browser/renderer_host/sandbox_ipc_linux.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <sys/poll.h> | 8 #include <sys/poll.h> |
| 9 #include <sys/socket.h> | 9 #include <sys/socket.h> |
| 10 #include <sys/stat.h> | 10 #include <sys/stat.h> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 using blink::WebUChar; | 35 using blink::WebUChar; |
| 36 using blink::WebUChar32; | 36 using blink::WebUChar32; |
| 37 | 37 |
| 38 namespace content { | 38 namespace content { |
| 39 | 39 |
| 40 SandboxIPCHandler::SandboxIPCHandler(int lifeline_fd, int browser_socket) | 40 SandboxIPCHandler::SandboxIPCHandler(int lifeline_fd, int browser_socket) |
| 41 : lifeline_fd_(lifeline_fd), browser_socket_(browser_socket) { | 41 : lifeline_fd_(lifeline_fd), browser_socket_(browser_socket) { |
| 42 // FontConfig doesn't provide a standard property to control subpixel | 42 // FontConfig doesn't provide a standard property to control subpixel |
| 43 // positioning, so we pass the current setting through to WebKit. | 43 // positioning, so we pass the current setting through to WebKit. |
| 44 WebFontInfo::setSubpixelPositioning( | 44 WebFontInfo::setSubpixelPositioning( |
| 45 gfx::GetDefaultWebkitSubpixelPositioning()); | 45 gfx::GetDefaultWebKitFontRenderParams().subpixel_positioning); |
| 46 } | 46 } |
| 47 | 47 |
| 48 void SandboxIPCHandler::Run() { | 48 void SandboxIPCHandler::Run() { |
| 49 struct pollfd pfds[2]; | 49 struct pollfd pfds[2]; |
| 50 pfds[0].fd = lifeline_fd_; | 50 pfds[0].fd = lifeline_fd_; |
| 51 pfds[0].events = POLLIN; | 51 pfds[0].events = POLLIN; |
| 52 pfds[1].fd = browser_socket_; | 52 pfds[1].fd = browser_socket_; |
| 53 pfds[1].events = POLLIN; | 53 pfds[1].events = POLLIN; |
| 54 | 54 |
| 55 int failed_polls = 0; | 55 int failed_polls = 0; |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 } | 410 } |
| 411 | 411 |
| 412 void SandboxIPCHandler::EnsureWebKitInitialized() { | 412 void SandboxIPCHandler::EnsureWebKitInitialized() { |
| 413 if (webkit_platform_support_) | 413 if (webkit_platform_support_) |
| 414 return; | 414 return; |
| 415 webkit_platform_support_.reset(new BlinkPlatformImpl); | 415 webkit_platform_support_.reset(new BlinkPlatformImpl); |
| 416 blink::initializeWithoutV8(webkit_platform_support_.get()); | 416 blink::initializeWithoutV8(webkit_platform_support_.get()); |
| 417 } | 417 } |
| 418 | 418 |
| 419 } // namespace content | 419 } // namespace content |
| OLD | NEW |