| 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/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/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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 RendererWebKitPlatformSupportImpl::SandboxSupport::getFallbackFontForCharacter( | 602 RendererWebKitPlatformSupportImpl::SandboxSupport::getFallbackFontForCharacter( |
| 603 blink::WebUChar32 character, | 603 blink::WebUChar32 character, |
| 604 const char* preferred_locale, | 604 const char* preferred_locale, |
| 605 blink::WebFallbackFont* fallbackFont) { | 605 blink::WebFallbackFont* fallbackFont) { |
| 606 base::AutoLock lock(unicode_font_families_mutex_); | 606 base::AutoLock lock(unicode_font_families_mutex_); |
| 607 const std::map<int32_t, blink::WebFallbackFont>::const_iterator iter = | 607 const std::map<int32_t, blink::WebFallbackFont>::const_iterator iter = |
| 608 unicode_font_families_.find(character); | 608 unicode_font_families_.find(character); |
| 609 if (iter != unicode_font_families_.end()) { | 609 if (iter != unicode_font_families_.end()) { |
| 610 fallbackFont->name = iter->second.name; | 610 fallbackFont->name = iter->second.name; |
| 611 fallbackFont->filename = iter->second.filename; | 611 fallbackFont->filename = iter->second.filename; |
| 612 fallbackFont->fontconfigInterfaceId = iter->second.fontconfigInterfaceId; |
| 612 fallbackFont->ttcIndex = iter->second.ttcIndex; | 613 fallbackFont->ttcIndex = iter->second.ttcIndex; |
| 613 fallbackFont->isBold = iter->second.isBold; | 614 fallbackFont->isBold = iter->second.isBold; |
| 614 fallbackFont->isItalic = iter->second.isItalic; | 615 fallbackFont->isItalic = iter->second.isItalic; |
| 615 return; | 616 return; |
| 616 } | 617 } |
| 617 | 618 |
| 618 GetFallbackFontForCharacter(character, preferred_locale, fallbackFont); | 619 GetFallbackFontForCharacter(character, preferred_locale, fallbackFont); |
| 619 unicode_font_families_.insert(std::make_pair(character, *fallbackFont)); | 620 unicode_font_families_.insert(std::make_pair(character, *fallbackFont)); |
| 620 } | 621 } |
| 621 | 622 |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1164 battery_status_dispatcher_->SetListener(listener); | 1165 battery_status_dispatcher_->SetListener(listener); |
| 1165 } | 1166 } |
| 1166 | 1167 |
| 1167 // static | 1168 // static |
| 1168 void RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting( | 1169 void RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting( |
| 1169 const blink::WebBatteryStatus& status) { | 1170 const blink::WebBatteryStatus& status) { |
| 1170 g_test_battery_status_dispatcher.Get().PostBatteryStatusChange(status); | 1171 g_test_battery_status_dispatcher.Get().PostBatteryStatusChange(status); |
| 1171 } | 1172 } |
| 1172 | 1173 |
| 1173 } // namespace content | 1174 } // namespace content |
| OLD | NEW |