diff options
Diffstat (limited to 'chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc')
-rw-r--r-- | chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc b/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc index c88de7f36b3..74cc14d65e9 100644 --- a/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc +++ b/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc @@ -22,7 +22,7 @@ #include "third_party/blink/public/platform/mac/web_sandbox_support.h" #elif defined(OS_POSIX) && !defined(OS_ANDROID) #include "content/child/child_process_sandbox_support_impl_linux.h" -#include "third_party/blink/public/platform/linux/web_fallback_font.h" +#include "third_party/blink/public/platform/linux/out_of_process_font.h" #include "third_party/blink/public/platform/linux/web_sandbox_support.h" #include "third_party/icu/source/common/unicode/utf16.h" #endif @@ -53,7 +53,10 @@ class PpapiBlinkPlatformImpl::SandboxSupport : public WebSandboxSupport { void GetFallbackFontForCharacter( WebUChar32 character, const char* preferred_locale, - blink::WebFallbackFont* fallbackFont) override; + blink::OutOfProcessFont* fallbackFont) override; + void MatchFontByPostscriptNameOrFullFontName( + const char* font_unique_name, + blink::OutOfProcessFont* fallback_font) override; void GetWebFontRenderStyleForStrike(const char* family, int size, bool is_bold, @@ -65,7 +68,7 @@ class PpapiBlinkPlatformImpl::SandboxSupport : public WebSandboxSupport { // WebKit likes to ask us for the correct font family to use for a set of // unicode code points. It needs this information frequently so we cache it // here. - std::map<int32_t, blink::WebFallbackFont> unicode_font_families_; + std::map<int32_t, blink::OutOfProcessFont> unicode_font_families_; sk_sp<font_service::FontLoader> font_loader_; // For debugging https://crbug.com/312965 base::SequenceCheckerImpl creation_thread_sequence_checker_; @@ -91,11 +94,11 @@ PpapiBlinkPlatformImpl::SandboxSupport::SandboxSupport() {} void PpapiBlinkPlatformImpl::SandboxSupport::GetFallbackFontForCharacter( WebUChar32 character, const char* preferred_locale, - blink::WebFallbackFont* fallbackFont) { + blink::OutOfProcessFont* fallbackFont) { ppapi::ProxyLock::AssertAcquired(); // For debugging crbug.com/312965 CHECK(creation_thread_sequence_checker_.CalledOnValidSequence()); - const std::map<int32_t, blink::WebFallbackFont>::const_iterator iter = + const std::map<int32_t, blink::OutOfProcessFont>::const_iterator iter = unicode_font_families_.find(character); if (iter != unicode_font_families_.end()) { fallbackFont->name = iter->second.name; @@ -124,6 +127,14 @@ void PpapiBlinkPlatformImpl::SandboxSupport::GetWebFontRenderStyleForStrike( device_scale_factor, out); } +void PpapiBlinkPlatformImpl::SandboxSupport:: + MatchFontByPostscriptNameOrFullFontName( + const char* font_unique_name, + blink::OutOfProcessFont* uniquely_matched_font) { + content::MatchFontByPostscriptNameOrFullFontName( + font_loader_, font_unique_name, uniquely_matched_font); +} + #endif #endif // !defined(OS_ANDROID) && !defined(OS_WIN) @@ -145,7 +156,7 @@ PpapiBlinkPlatformImpl::~PpapiBlinkPlatformImpl() { void PpapiBlinkPlatformImpl::Shutdown() { #if !defined(OS_ANDROID) && !defined(OS_WIN) - // SandboxSupport contains a map of WebFallbackFont objects, which hold + // SandboxSupport contains a map of OutOfProcessFont objects, which hold // WebStrings and WebVectors, which become invalidated when blink is shut // down. Hence, we need to clear that map now, just before blink::shutdown() // is called. @@ -153,10 +164,6 @@ void PpapiBlinkPlatformImpl::Shutdown() { #endif } -blink::WebThread* PpapiBlinkPlatformImpl::CurrentThread() { - return BlinkPlatformImpl::CurrentThread(); -} - blink::WebSandboxSupport* PpapiBlinkPlatformImpl::GetSandboxSupport() { #if !defined(OS_ANDROID) && !defined(OS_WIN) return sandbox_support_.get(); @@ -165,10 +172,6 @@ blink::WebSandboxSupport* PpapiBlinkPlatformImpl::GetSandboxSupport() { #endif } -bool PpapiBlinkPlatformImpl::sandboxEnabled() { - return true; // Assume PPAPI is always sandboxed. -} - unsigned long long PpapiBlinkPlatformImpl::VisitedLinkHash( const char* canonical_url, size_t length) { |