| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 return; | 300 return; |
| 301 } | 301 } |
| 302 | 302 |
| 303 EnsureWebKitInitialized(); | 303 EnsureWebKitInitialized(); |
| 304 | 304 |
| 305 gfx::FontRenderParamsQuery query(true); | 305 gfx::FontRenderParamsQuery query(true); |
| 306 query.families.push_back(family); | 306 query.families.push_back(family); |
| 307 query.pixel_size = pixel_size; | 307 query.pixel_size = pixel_size; |
| 308 query.style = gfx::Font::NORMAL | | 308 query.style = gfx::Font::NORMAL | |
| 309 (bold ? gfx::Font::BOLD : 0) | (italic ? gfx::Font::ITALIC : 0); | 309 (bold ? gfx::Font::BOLD : 0) | (italic ? gfx::Font::ITALIC : 0); |
| 310 const gfx::FontRenderParams params = gfx::GetFontRenderParams(query, NULL); | 310 const gfx::FontRenderParams params = |
| 311 gfx::GetCurrentFontRenderParams(query, NULL); |
| 311 | 312 |
| 312 // These are passed as ints since they're interpreted as tri-state chars in | 313 // These are passed as ints since they're interpreted as tri-state chars in |
| 313 // Blink. | 314 // Blink. |
| 314 Pickle reply; | 315 Pickle reply; |
| 315 reply.WriteInt(params.use_bitmaps); | 316 reply.WriteInt(params.use_bitmaps); |
| 316 reply.WriteInt(params.autohinter); | 317 reply.WriteInt(params.autohinter); |
| 317 reply.WriteInt(params.hinting != gfx::FontRenderParams::HINTING_NONE); | 318 reply.WriteInt(params.hinting != gfx::FontRenderParams::HINTING_NONE); |
| 318 reply.WriteInt(ConvertHinting(params.hinting)); | 319 reply.WriteInt(ConvertHinting(params.hinting)); |
| 319 reply.WriteInt(params.antialiasing); | 320 reply.WriteInt(params.antialiasing); |
| 320 reply.WriteInt(ConvertSubpixelRendering(params.subpixel_rendering)); | 321 reply.WriteInt(ConvertSubpixelRendering(params.subpixel_rendering)); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 } | 454 } |
| 454 | 455 |
| 455 void SandboxIPCHandler::EnsureWebKitInitialized() { | 456 void SandboxIPCHandler::EnsureWebKitInitialized() { |
| 456 if (blink_platform_impl_) | 457 if (blink_platform_impl_) |
| 457 return; | 458 return; |
| 458 blink_platform_impl_.reset(new BlinkPlatformImpl); | 459 blink_platform_impl_.reset(new BlinkPlatformImpl); |
| 459 blink::initializeWithoutV8(blink_platform_impl_.get()); | 460 blink::initializeWithoutV8(blink_platform_impl_.get()); |
| 460 } | 461 } |
| 461 | 462 |
| 462 } // namespace content | 463 } // namespace content |
| OLD | NEW |