| 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 29 matching lines...) Expand all Loading... |
| 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat
cher.h" | 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat
cher.h" |
| 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" | 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" |
| 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" |
| 43 #include "webkit/glue/simple_webmimeregistry_impl.h" | 43 #include "webkit/glue/simple_webmimeregistry_impl.h" |
| 44 #include "webkit/glue/webclipboard_impl.h" | 44 #include "webkit/glue/webclipboard_impl.h" |
| 45 #include "webkit/glue/webfileutilities_impl.h" | 45 #include "webkit/glue/webfileutilities_impl.h" |
| 46 #include "webkit/glue/webkit_glue.h" | 46 #include "webkit/glue/webkit_glue.h" |
| 47 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" | 47 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
| 48 | 48 |
| 49 #if defined(OS_WIN) | 49 #if defined(OS_WIN) |
| 50 #include "content/common/child_process_messages.h" |
| 50 #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebSandboxSupport
.h" | 51 #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebSandboxSupport
.h" |
| 51 #endif | 52 #endif |
| 52 | 53 |
| 53 #if defined(OS_MACOSX) | 54 #if defined(OS_MACOSX) |
| 54 #include "content/common/mac/font_descriptor.h" | 55 #include "content/common/mac/font_descriptor.h" |
| 55 #include "content/common/mac/font_loader.h" | 56 #include "content/common/mac/font_loader.h" |
| 56 #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebSandboxSupport
.h" | 57 #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebSandboxSupport
.h" |
| 57 #endif | 58 #endif |
| 58 | 59 |
| 59 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 60 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 } | 438 } |
| 438 | 439 |
| 439 //------------------------------------------------------------------------------ | 440 //------------------------------------------------------------------------------ |
| 440 | 441 |
| 441 #if defined(OS_WIN) | 442 #if defined(OS_WIN) |
| 442 | 443 |
| 443 bool RendererWebKitPlatformSupportImpl::SandboxSupport::ensureFontLoaded( | 444 bool RendererWebKitPlatformSupportImpl::SandboxSupport::ensureFontLoaded( |
| 444 HFONT font) { | 445 HFONT font) { |
| 445 LOGFONT logfont; | 446 LOGFONT logfont; |
| 446 GetObject(font, sizeof(LOGFONT), &logfont); | 447 GetObject(font, sizeof(LOGFONT), &logfont); |
| 447 return RenderThread::current()->Send(new ViewHostMsg_PreCacheFont(logfont)); | 448 return RenderThread::current()->Send( |
| 449 new ChildProcessHostMsg_PreCacheFont(logfont)); |
| 448 } | 450 } |
| 449 | 451 |
| 450 #elif defined(OS_MACOSX) | 452 #elif defined(OS_MACOSX) |
| 451 | 453 |
| 452 bool RendererWebKitPlatformSupportImpl::SandboxSupport::loadFont( | 454 bool RendererWebKitPlatformSupportImpl::SandboxSupport::loadFont( |
| 453 NSFont* src_font, CGFontRef* out, uint32* font_id) { | 455 NSFont* src_font, CGFontRef* out, uint32* font_id) { |
| 454 uint32 font_data_size; | 456 uint32 font_data_size; |
| 455 FontDescriptor src_font_descriptor(src_font); | 457 FontDescriptor src_font_descriptor(src_font); |
| 456 base::SharedMemoryHandle font_data; | 458 base::SharedMemoryHandle font_data; |
| 457 if (!RenderThread::current()->Send(new ViewHostMsg_LoadFont( | 459 if (!RenderThread::current()->Send(new ViewHostMsg_LoadFont( |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 } | 602 } |
| 601 | 603 |
| 602 //------------------------------------------------------------------------------ | 604 //------------------------------------------------------------------------------ |
| 603 | 605 |
| 604 WebBlobRegistry* RendererWebKitPlatformSupportImpl::blobRegistry() { | 606 WebBlobRegistry* RendererWebKitPlatformSupportImpl::blobRegistry() { |
| 605 // RenderThread::current can be NULL when running some tests. | 607 // RenderThread::current can be NULL when running some tests. |
| 606 if (!blob_registry_.get() && RenderThread::current()) | 608 if (!blob_registry_.get() && RenderThread::current()) |
| 607 blob_registry_.reset(new WebBlobRegistryImpl(RenderThread::current())); | 609 blob_registry_.reset(new WebBlobRegistryImpl(RenderThread::current())); |
| 608 return blob_registry_.get(); | 610 return blob_registry_.get(); |
| 609 } | 611 } |
| OLD | NEW |