Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 10052006: Merge 131324 - Mac: OOP font loading should run on FILE thread. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/sandbox_mac_fontloading_unittest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 base::SharedMemoryHandle font_data; 494 base::SharedMemoryHandle font_data;
495 if (!RenderThreadImpl::current()->Send(new ViewHostMsg_LoadFont( 495 if (!RenderThreadImpl::current()->Send(new ViewHostMsg_LoadFont(
496 src_font_descriptor, &font_data_size, &font_data, font_id))) { 496 src_font_descriptor, &font_data_size, &font_data, font_id))) {
497 *out = NULL; 497 *out = NULL;
498 *font_id = 0; 498 *font_id = 0;
499 return false; 499 return false;
500 } 500 }
501 501
502 if (font_data_size == 0 || font_data == base::SharedMemory::NULLHandle() || 502 if (font_data_size == 0 || font_data == base::SharedMemory::NULLHandle() ||
503 *font_id == 0) { 503 *font_id == 0) {
504 NOTREACHED() << "Bad response from ViewHostMsg_LoadFont() for " << 504 LOG(ERROR) << "Bad response from ViewHostMsg_LoadFont() for " <<
505 src_font_descriptor.font_name; 505 src_font_descriptor.font_name;
506 *out = NULL; 506 *out = NULL;
507 *font_id = 0; 507 *font_id = 0;
508 return false; 508 return false;
509 } 509 }
510 510
511 // TODO(jeremy): Need to call back into WebKit to make sure that the font 511 // TODO(jeremy): Need to call back into WebKit to make sure that the font
512 // isn't already activated, based on the font id. If it's already 512 // isn't already activated, based on the font id. If it's already
513 // activated, don't reactivate it here - crbug.com/72727 . 513 // activated, don't reactivate it here - crbug.com/72727 .
514 514
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 DCHECK(render_thread); 737 DCHECK(render_thread);
738 if (!render_thread) 738 if (!render_thread)
739 return NULL; 739 return NULL;
740 return render_thread->CreateMediaStreamCenter(client); 740 return render_thread->CreateMediaStreamCenter(client);
741 } 741 }
742 742
743 GpuChannelHostFactory* 743 GpuChannelHostFactory*
744 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { 744 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() {
745 return RenderThreadImpl::current(); 745 return RenderThreadImpl::current();
746 } 746 }
OLDNEW
« no previous file with comments | « content/common/sandbox_mac_fontloading_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698