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

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

Issue 1346473003: Move font IPCs to be RenderProcess messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « content/renderer/render_thread_impl.cc ('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_blink_platform_impl.h" 5 #include "content/renderer/renderer_blink_platform_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 //------------------------------------------------------------------------------ 531 //------------------------------------------------------------------------------
532 532
533 #if defined(OS_MACOSX) 533 #if defined(OS_MACOSX)
534 534
535 bool RendererBlinkPlatformImpl::SandboxSupport::loadFont(NSFont* src_font, 535 bool RendererBlinkPlatformImpl::SandboxSupport::loadFont(NSFont* src_font,
536 CGFontRef* out, 536 CGFontRef* out,
537 uint32* font_id) { 537 uint32* font_id) {
538 uint32 font_data_size; 538 uint32 font_data_size;
539 FontDescriptor src_font_descriptor(src_font); 539 FontDescriptor src_font_descriptor(src_font);
540 base::SharedMemoryHandle font_data; 540 base::SharedMemoryHandle font_data;
541 if (!RenderThread::Get()->Send(new FrameHostMsg_LoadFont( 541 if (!RenderThread::Get()->Send(new RenderProcessHostMsg_LoadFont(
542 src_font_descriptor, &font_data_size, &font_data, font_id))) { 542 src_font_descriptor, &font_data_size, &font_data, font_id))) {
543 *out = NULL; 543 *out = NULL;
544 *font_id = 0; 544 *font_id = 0;
545 return false; 545 return false;
546 } 546 }
547 547
548 if (font_data_size == 0 || font_data == base::SharedMemory::NULLHandle() || 548 if (font_data_size == 0 || font_data == base::SharedMemory::NULLHandle() ||
549 *font_id == 0) { 549 *font_id == 0) {
550 LOG(ERROR) << "Bad response from FrameHostMsg_LoadFont() for " << 550 LOG(ERROR) << "Bad response from RenderProcessHostMsg_LoadFont() for " <<
551 src_font_descriptor.font_name; 551 src_font_descriptor.font_name;
552 *out = NULL; 552 *out = NULL;
553 *font_id = 0; 553 *font_id = 0;
554 return false; 554 return false;
555 } 555 }
556 556
557 // TODO(jeremy): Need to call back into WebKit to make sure that the font 557 // TODO(jeremy): Need to call back into WebKit to make sure that the font
558 // isn't already activated, based on the font id. If it's already 558 // isn't already activated, based on the font id. If it's already
559 // activated, don't reactivate it here - crbug.com/72727 . 559 // activated, don't reactivate it here - crbug.com/72727 .
560 560
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 //------------------------------------------------------------------------------ 1256 //------------------------------------------------------------------------------
1257 1257
1258 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( 1258 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting(
1259 const blink::WebBatteryStatus& status) { 1259 const blink::WebBatteryStatus& status) {
1260 if (!g_test_battery_status_listener) 1260 if (!g_test_battery_status_listener)
1261 return; 1261 return;
1262 g_test_battery_status_listener->updateBatteryStatus(status); 1262 g_test_battery_status_listener->updateBatteryStatus(status);
1263 } 1263 }
1264 1264
1265 } // namespace content 1265 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698