Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(844)

Unified Diff: ppapi/thunk/ppb_truetype_font_dev_thunk.cc

Issue 13913006: Add Pepper TrueType font API call to enumerate fonts in a given family. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows build again. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/thunk/ppb_truetype_font_dev_thunk.cc
diff --git a/ppapi/thunk/ppb_truetype_font_dev_thunk.cc b/ppapi/thunk/ppb_truetype_font_dev_thunk.cc
index 610914ad5af23b428ef479ddce56f40bb6019fb2..afed58e7b6b69d6892d4f2c1007b165aebbf1765 100644
--- a/ppapi/thunk/ppb_truetype_font_dev_thunk.cc
+++ b/ppapi/thunk/ppb_truetype_font_dev_thunk.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// From dev/ppb_truetype_font_dev.idl modified Wed Apr 10 11:59:27 2013.
+// From dev/ppb_truetype_font_dev.idl modified Wed Apr 17 15:38:46 2013.
#include "ppapi/c/dev/ppb_truetype_font_dev.h"
#include "ppapi/c/pp_completion_callback.h"
@@ -33,6 +33,21 @@ int32_t GetFontFamilies(PP_Instance instance,
enter.callback()));
}
+int32_t GetFontsInFamily(PP_Instance instance,
+ struct PP_Var family,
+ struct PP_ArrayOutput output,
+ struct PP_CompletionCallback callback) {
+ VLOG(4) << "PPB_TrueTypeFont_Dev::GetFontsInFamily()";
+ EnterInstanceAPI<PPB_TrueTypeFont_Singleton_API> enter(instance, callback);
+ if (enter.failed())
+ return enter.retval();
+ return enter.SetResult(enter.functions()->GetFontsInFamily(
+ instance,
+ family,
+ output,
+ enter.callback()));
+}
+
PP_Resource Create(PP_Instance instance,
const struct PP_TrueTypeFontDesc_Dev* desc) {
VLOG(4) << "PPB_TrueTypeFont_Dev::Create()";
@@ -88,6 +103,7 @@ int32_t GetTable(PP_Resource font,
const PPB_TrueTypeFont_Dev_0_1 g_ppb_truetypefont_dev_thunk_0_1 = {
&GetFontFamilies,
+ &GetFontsInFamily,
&Create,
&IsTrueTypeFont,
&Describe,

Powered by Google App Engine
This is Rietveld 408576698