OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/render_message_filter.h" | 5 #include "content/browser/renderer_host/render_message_filter.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 #else | 77 #else |
78 #include "gpu/GLES2/gl2extchromium.h" | 78 #include "gpu/GLES2/gl2extchromium.h" |
79 #include "third_party/khronos/GLES2/gl2.h" | 79 #include "third_party/khronos/GLES2/gl2.h" |
80 #include "third_party/khronos/GLES2/gl2ext.h" | 80 #include "third_party/khronos/GLES2/gl2ext.h" |
81 #endif | 81 #endif |
82 #if defined(OS_POSIX) | 82 #if defined(OS_POSIX) |
83 #include "base/file_descriptor_posix.h" | 83 #include "base/file_descriptor_posix.h" |
84 #endif | 84 #endif |
85 #if defined(OS_WIN) | 85 #if defined(OS_WIN) |
86 #include "content/common/font_cache_dispatcher_win.h" | 86 #include "content/common/font_cache_dispatcher_win.h" |
| 87 #include "content/common/sandbox_win.h" |
87 #endif | 88 #endif |
88 #if defined(OS_ANDROID) | 89 #if defined(OS_ANDROID) |
89 #include "media/base/android/webaudio_media_codec_bridge.h" | 90 #include "media/base/android/webaudio_media_codec_bridge.h" |
90 #endif | 91 #endif |
91 | 92 |
92 using net::CookieStore; | 93 using net::CookieStore; |
93 | 94 |
94 namespace content { | 95 namespace content { |
95 namespace { | 96 namespace { |
96 | 97 |
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 return; | 1195 return; |
1195 } | 1196 } |
1196 | 1197 |
1197 GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs( | 1198 GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs( |
1198 top_origin_url, guilt); | 1199 top_origin_url, guilt); |
1199 } | 1200 } |
1200 | 1201 |
1201 #if defined(OS_WIN) | 1202 #if defined(OS_WIN) |
1202 void RenderMessageFilter::OnPreCacheFontCharacters(const LOGFONT& font, | 1203 void RenderMessageFilter::OnPreCacheFontCharacters(const LOGFONT& font, |
1203 const base::string16& str) { | 1204 const base::string16& str) { |
| 1205 // TODO(scottmg): Move this to FontCacheDispatcher, http://crbug.com/356346. |
| 1206 if (!ShouldUseDirectWrite()) |
| 1207 return; |
1204 // First, comments from FontCacheDispatcher::OnPreCacheFont do apply here too. | 1208 // First, comments from FontCacheDispatcher::OnPreCacheFont do apply here too. |
1205 // Except that for True Type fonts, | 1209 // Except that for True Type fonts, |
1206 // GetTextMetrics will not load the font in memory. | 1210 // GetTextMetrics will not load the font in memory. |
1207 // The only way windows seem to load properly, it is to create a similar | 1211 // The only way windows seem to load properly, it is to create a similar |
1208 // device (like the one in which we print), then do an ExtTextOut, | 1212 // device (like the one in which we print), then do an ExtTextOut, |
1209 // as we do in the printing thread, which is sandboxed. | 1213 // as we do in the printing thread, which is sandboxed. |
1210 HDC hdc = CreateEnhMetaFile(NULL, NULL, NULL, NULL); | 1214 HDC hdc = CreateEnhMetaFile(NULL, NULL, NULL, NULL); |
1211 HFONT font_handle = CreateFontIndirect(&font); | 1215 HFONT font_handle = CreateFontIndirect(&font); |
1212 DCHECK(NULL != font_handle); | 1216 DCHECK(NULL != font_handle); |
1213 | 1217 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 } | 1316 } |
1313 | 1317 |
1314 // Fallback to fake GpuMemoryBuffer that is backed by shared memory and | 1318 // Fallback to fake GpuMemoryBuffer that is backed by shared memory and |
1315 // requires an upload before it can be used as a texture. | 1319 // requires an upload before it can be used as a texture. |
1316 handle->type = gfx::SHARED_MEMORY_BUFFER; | 1320 handle->type = gfx::SHARED_MEMORY_BUFFER; |
1317 ChildProcessHostImpl::AllocateSharedMemory( | 1321 ChildProcessHostImpl::AllocateSharedMemory( |
1318 static_cast<size_t>(buffer_size), PeerHandle(), &handle->handle); | 1322 static_cast<size_t>(buffer_size), PeerHandle(), &handle->handle); |
1319 } | 1323 } |
1320 | 1324 |
1321 } // namespace content | 1325 } // namespace content |
OLD | NEW |