OLD | NEW |
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_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 } | 442 } |
443 | 443 |
444 //------------------------------------------------------------------------------ | 444 //------------------------------------------------------------------------------ |
445 | 445 |
446 #if defined(OS_WIN) | 446 #if defined(OS_WIN) |
447 | 447 |
448 bool RendererWebKitPlatformSupportImpl::SandboxSupport::ensureFontLoaded( | 448 bool RendererWebKitPlatformSupportImpl::SandboxSupport::ensureFontLoaded( |
449 HFONT font) { | 449 HFONT font) { |
450 LOGFONT logfont; | 450 LOGFONT logfont; |
451 GetObject(font, sizeof(LOGFONT), &logfont); | 451 GetObject(font, sizeof(LOGFONT), &logfont); |
452 return RenderThread::current()->Send(new ViewHostMsg_PreCacheFont(logfont)); | 452 return RenderThread::current()->Send( |
| 453 new ViewHostMsg_PreCacheFont(logfont, GetCurrentProcessId())); |
453 } | 454 } |
454 | 455 |
455 #elif defined(OS_MACOSX) | 456 #elif defined(OS_MACOSX) |
456 | 457 |
457 bool RendererWebKitPlatformSupportImpl::SandboxSupport::loadFont( | 458 bool RendererWebKitPlatformSupportImpl::SandboxSupport::loadFont( |
458 NSFont* src_font, CGFontRef* out, uint32* font_id) { | 459 NSFont* src_font, CGFontRef* out, uint32* font_id) { |
459 uint32 font_data_size; | 460 uint32 font_data_size; |
460 FontDescriptor src_font_descriptor(src_font); | 461 FontDescriptor src_font_descriptor(src_font); |
461 base::SharedMemoryHandle font_data; | 462 base::SharedMemoryHandle font_data; |
462 if (!RenderThread::current()->Send(new ViewHostMsg_LoadFont( | 463 if (!RenderThread::current()->Send(new ViewHostMsg_LoadFont( |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 } | 631 } |
631 | 632 |
632 //------------------------------------------------------------------------------ | 633 //------------------------------------------------------------------------------ |
633 | 634 |
634 WebBlobRegistry* RendererWebKitPlatformSupportImpl::blobRegistry() { | 635 WebBlobRegistry* RendererWebKitPlatformSupportImpl::blobRegistry() { |
635 // RenderThread::current can be NULL when running some tests. | 636 // RenderThread::current can be NULL when running some tests. |
636 if (!blob_registry_.get() && RenderThread::current()) | 637 if (!blob_registry_.get() && RenderThread::current()) |
637 blob_registry_.reset(new WebBlobRegistryImpl(RenderThread::current())); | 638 blob_registry_.reset(new WebBlobRegistryImpl(RenderThread::current())); |
638 return blob_registry_.get(); | 639 return blob_registry_.get(); |
639 } | 640 } |
OLD | NEW |