summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 22:25:54 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 22:25:54 +0000
commitadb072f92d93e5adf28a77fb4f6c15effca7b001 (patch)
tree11043d294f773825ecd59aa8f8ede9df549f1e30 /webkit/glue
parentd4d1b878fde9f01c21a8e247288d56df1e5382c6 (diff)
downloadchromium_src-adb072f92d93e5adf28a77fb4f6c15effca7b001.zip
chromium_src-adb072f92d93e5adf28a77fb4f6c15effca7b001.tar.gz
chromium_src-adb072f92d93e5adf28a77fb4f6c15effca7b001.tar.bz2
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
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/plugins/npapi_extension_thunk.cc9
-rw-r--r--webkit/glue/plugins/webplugin_delegate.h1
2 files changed, 10 insertions, 0 deletions
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<NPAPI::PluginInstance> 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.