| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 290 |
| 291 if (!iter.ReadString(&family) || | 291 if (!iter.ReadString(&family) || |
| 292 !iter.ReadBool(&bold) || | 292 !iter.ReadBool(&bold) || |
| 293 !iter.ReadBool(&italic) || | 293 !iter.ReadBool(&italic) || |
| 294 !iter.ReadUInt16(&pixel_size)) { | 294 !iter.ReadUInt16(&pixel_size)) { |
| 295 return; | 295 return; |
| 296 } | 296 } |
| 297 | 297 |
| 298 EnsureWebKitInitialized(); | 298 EnsureWebKitInitialized(); |
| 299 | 299 |
| 300 gfx::FontRenderParamsQuery query(true); | 300 gfx::FontRenderParamsQuery query; |
| 301 query.families.push_back(family); | 301 query.families.push_back(family); |
| 302 query.pixel_size = pixel_size; | 302 query.pixel_size = pixel_size; |
| 303 query.style = gfx::Font::NORMAL | | 303 query.style = gfx::Font::NORMAL | |
| 304 (bold ? gfx::Font::BOLD : 0) | (italic ? gfx::Font::ITALIC : 0); | 304 (bold ? gfx::Font::BOLD : 0) | (italic ? gfx::Font::ITALIC : 0); |
| 305 const gfx::FontRenderParams params = gfx::GetFontRenderParams(query, NULL); | 305 const gfx::FontRenderParams params = gfx::GetFontRenderParams(query, NULL); |
| 306 | 306 |
| 307 // These are passed as ints since they're interpreted as tri-state chars in | 307 // These are passed as ints since they're interpreted as tri-state chars in |
| 308 // Blink. | 308 // Blink. |
| 309 Pickle reply; | 309 Pickle reply; |
| 310 reply.WriteInt(params.use_bitmaps); | 310 reply.WriteInt(params.use_bitmaps); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 } | 443 } |
| 444 | 444 |
| 445 void SandboxIPCHandler::EnsureWebKitInitialized() { | 445 void SandboxIPCHandler::EnsureWebKitInitialized() { |
| 446 if (blink_platform_impl_) | 446 if (blink_platform_impl_) |
| 447 return; | 447 return; |
| 448 blink_platform_impl_.reset(new BlinkPlatformImpl); | 448 blink_platform_impl_.reset(new BlinkPlatformImpl); |
| 449 blink::initializeWithoutV8(blink_platform_impl_.get()); | 449 blink::initializeWithoutV8(blink_platform_impl_.get()); |
| 450 } | 450 } |
| 451 | 451 |
| 452 } // namespace content | 452 } // namespace content |
| OLD | NEW |