Index: ppapi/thunk/ppb_truetype_font_dev_thunk.cc |
diff --git a/ppapi/thunk/ppb_truetype_font_thunk.cc b/ppapi/thunk/ppb_truetype_font_dev_thunk.cc |
similarity index 72% |
rename from ppapi/thunk/ppb_truetype_font_thunk.cc |
rename to ppapi/thunk/ppb_truetype_font_dev_thunk.cc |
index b941c84c8bd8fba2b77db1f30fb70059c8e698e5..84bf521fbe9a361da0de53796b59f567841b040f 100644 |
--- a/ppapi/thunk/ppb_truetype_font_thunk.cc |
+++ b/ppapi/thunk/ppb_truetype_font_dev_thunk.cc |
@@ -2,6 +2,8 @@ |
// 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 10:12:54 2013. |
+ |
#include "ppapi/c/dev/ppb_truetype_font_dev.h" |
#include "ppapi/c/pp_completion_callback.h" |
#include "ppapi/c/pp_errors.h" |
@@ -19,20 +21,23 @@ namespace thunk { |
namespace { |
int32_t GetFontFamilies(PP_Instance instance, |
- PP_ArrayOutput output, |
- PP_CompletionCallback callback) { |
+ struct PP_ArrayOutput output, |
+ struct PP_CompletionCallback callback) { |
EnterInstanceAPI<PPB_TrueTypeFont_Singleton_API> enter(instance, callback); |
if (enter.failed()) |
- return PP_ERROR_FAILED; |
- return enter.functions()->GetFontFamilies(instance, output, enter.callback()); |
+ return enter.retval(); |
+ return enter.SetResult(enter.functions()->GetFontFamilies( |
yzshen1
2013/04/10 17:00:48
Nice catch. :)
bbudge
2013/04/10 17:40:37
You might have to rebase - I added enter.SetResult
|
+ instance, |
+ output, |
+ enter.callback())); |
} |
PP_Resource Create(PP_Instance instance, |
- const PP_TrueTypeFontDesc_Dev* desc) { |
+ const struct PP_TrueTypeFontDesc_Dev* desc) { |
EnterResourceCreation enter(instance); |
if (enter.failed()) |
return 0; |
- return enter.functions()->CreateTrueTypeFont(instance, *desc); |
+ return enter.functions()->CreateTrueTypeFont(instance, desc); |
} |
PP_Bool IsFont(PP_Resource resource) { |
@@ -41,8 +46,8 @@ PP_Bool IsFont(PP_Resource resource) { |
} |
int32_t Describe(PP_Resource font, |
- PP_TrueTypeFontDesc_Dev* desc, |
- PP_CompletionCallback callback) { |
+ struct PP_TrueTypeFontDesc_Dev* desc, |
+ struct PP_CompletionCallback callback) { |
EnterResource<PPB_TrueTypeFont_API> enter(font, callback, true); |
if (enter.failed()) |
return enter.retval(); |
@@ -50,8 +55,8 @@ int32_t Describe(PP_Resource font, |
} |
int32_t GetTableTags(PP_Resource font, |
- PP_ArrayOutput output, |
- PP_CompletionCallback callback) { |
+ struct PP_ArrayOutput output, |
+ struct PP_CompletionCallback callback) { |
EnterResource<PPB_TrueTypeFont_API> enter(font, callback, true); |
if (enter.failed()) |
return enter.retval(); |
@@ -63,8 +68,8 @@ int32_t GetTable(PP_Resource font, |
uint32_t table, |
int32_t offset, |
int32_t max_data_length, |
- PP_ArrayOutput output, |
- PP_CompletionCallback callback) { |
+ struct PP_ArrayOutput output, |
+ struct PP_CompletionCallback callback) { |
EnterResource<PPB_TrueTypeFont_API> enter(font, callback, true); |
if (enter.failed()) |
return enter.retval(); |
@@ -75,7 +80,7 @@ int32_t GetTable(PP_Resource font, |
enter.callback())); |
} |
-const PPB_TrueTypeFont_Dev_0_1 g_ppb_truetypefont_thunk_0_1 = { |
+const PPB_TrueTypeFont_Dev_0_1 g_ppb_truetypefont_dev_thunk_0_1 = { |
&GetFontFamilies, |
&Create, |
&IsFont, |
@@ -87,7 +92,7 @@ const PPB_TrueTypeFont_Dev_0_1 g_ppb_truetypefont_thunk_0_1 = { |
} // namespace |
const PPB_TrueTypeFont_Dev_0_1* GetPPB_TrueTypeFont_Dev_0_1_Thunk() { |
- return &g_ppb_truetypefont_thunk_0_1; |
+ return &g_ppb_truetypefont_dev_thunk_0_1; |
} |
} // namespace thunk |