From adb072f92d93e5adf28a77fb4f6c15effca7b001 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Fri, 11 Jun 2010 22:25:54 +0000 Subject: Add a font API to Pepper and implement on Linux based on agl's code from http://codereview.chromium.org/2673003. Review URL: http://codereview.chromium.org/2794004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49599 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/plugins/npapi_extension_thunk.cc | 9 +++++++++ webkit/glue/plugins/webplugin_delegate.h | 1 + 2 files changed, 10 insertions(+) (limited to 'webkit') diff --git a/webkit/glue/plugins/npapi_extension_thunk.cc b/webkit/glue/plugins/npapi_extension_thunk.cc index bcf4be1..d2abd27 100644 --- a/webkit/glue/plugins/npapi_extension_thunk.cc +++ b/webkit/glue/plugins/npapi_extension_thunk.cc @@ -526,6 +526,14 @@ static NPError NPSetCursor(NPP id, NPCursorType type) { NPERR_NO_ERROR : NPERR_GENERIC_ERROR; } +static NPFontExtensions* GetFontExtensions(NPP id) { + scoped_refptr plugin = FindInstance(id); + if (!plugin) + return NULL; + + return plugin->webplugin()->delegate()->GetFontExtensions(); +} + namespace NPAPI { NPError GetPepperExtensionsFunctions(void* value) { @@ -537,6 +545,7 @@ NPError GetPepperExtensionsFunctions(void* value) { &ChooseFile, &GetWidgetExtensions, &NPSetCursor, + &GetFontExtensions, }; // Return a pointer to the canonical function table. diff --git a/webkit/glue/plugins/webplugin_delegate.h b/webkit/glue/plugins/webplugin_delegate.h index 12ac01b..413a509 100644 --- a/webkit/glue/plugins/webplugin_delegate.h +++ b/webkit/glue/plugins/webplugin_delegate.h @@ -152,6 +152,7 @@ class WebPluginDelegate : public WebPlugin2DDeviceDelegate, virtual void SelectedFindResultChanged(int index) {} virtual NPWidgetExtensions* GetWidgetExtensions() { return NULL; } virtual bool SetCursor(NPCursorType type) { return false; } + virtual NPFontExtensions* GetFontExtensions() { return NULL; } // Used for zooming of full page plugins. 0 means reset, while -1 means zoom // out and +1 means zoom in. -- cgit v1.1