Fix API changes of Chrome 53

This commit is contained in:
Cheng Zhao 2016-09-06 17:24:37 +09:00
parent 2e0a1a8a64
commit f28e8d7168
52 changed files with 301 additions and 173 deletions

View file

@ -205,8 +205,8 @@ int32_t PepperFlashRendererHost::OnDrawGlyphs(
style |= SkTypeface::kBold;
if (params.font_desc.italic)
style |= SkTypeface::kItalic;
sk_sp<SkTypeface> typeface(SkTypeface::CreateFromName(
params.font_desc.face.c_str(), static_cast<SkTypeface::Style>(style)));
sk_sp<SkTypeface> typeface(SkTypeface::MakeFromName(
params.font_desc.face.c_str(), SkFontStyle::FromOldStyle(style)));
if (!typeface)
return PP_ERROR_FAILED;

View file

@ -24,3 +24,7 @@ void PepperHelper::DidCreatePepperPlugin(content::RendererPpapiHost* host) {
std::unique_ptr<ppapi::host::InstanceMessageFilter>(
new PepperSharedMemoryMessageFilter(host)));
}
void PepperHelper::OnDestruct() {
delete this;
}

View file

@ -17,6 +17,7 @@ class PepperHelper : public content::RenderFrameObserver {
// RenderFrameObserver.
void DidCreatePepperPlugin(content::RendererPpapiHost* host) override;
void OnDestruct() override;
private:
DISALLOW_COPY_AND_ASSIGN(PepperHelper);