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

Unified Diff: ppapi/thunk/ppb_truetype_font_dev_thunk.cc

Issue 13820003: Pepper: Autogenerate thunk for PPB_TrueTypeFont. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nit comment in gamepad for presubmit 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
« no previous file with comments | « ppapi/tests/test_truetype_font.cc ('k') | ppapi/thunk/ppb_truetype_font_thunk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 64%
rename from ppapi/thunk/ppb_truetype_font_thunk.cc
rename to ppapi/thunk/ppb_truetype_font_dev_thunk.cc
index 4b47afbe5a3f3e496706c944a1923b2fe77cdb67..610914ad5af23b428ef479ddce56f40bb6019fb2 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 11:59:27 2013.
+
#include "ppapi/c/dev/ppb_truetype_font_dev.h"
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
@@ -19,31 +21,37 @@ namespace thunk {
namespace {
int32_t GetFontFamilies(PP_Instance instance,
- PP_ArrayOutput output,
- PP_CompletionCallback callback) {
+ struct PP_ArrayOutput output,
+ struct PP_CompletionCallback callback) {
+ VLOG(4) << "PPB_TrueTypeFont_Dev::GetFontFamilies()";
EnterInstanceAPI<PPB_TrueTypeFont_Singleton_API> enter(instance, callback);
if (enter.failed())
- return PP_ERROR_FAILED;
- return enter.SetResult(
- enter.functions()->GetFontFamilies(instance, output, enter.callback()));
+ return enter.retval();
+ return enter.SetResult(enter.functions()->GetFontFamilies(
+ instance,
+ output,
+ enter.callback()));
}
PP_Resource Create(PP_Instance instance,
- const PP_TrueTypeFontDesc_Dev* desc) {
+ const struct PP_TrueTypeFontDesc_Dev* desc) {
+ VLOG(4) << "PPB_TrueTypeFont_Dev::Create()";
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) {
+PP_Bool IsTrueTypeFont(PP_Resource resource) {
+ VLOG(4) << "PPB_TrueTypeFont_Dev::IsTrueTypeFont()";
EnterResource<PPB_TrueTypeFont_API> enter(resource, false);
return PP_FromBool(enter.succeeded());
}
int32_t Describe(PP_Resource font,
- PP_TrueTypeFontDesc_Dev* desc,
- PP_CompletionCallback callback) {
+ struct PP_TrueTypeFontDesc_Dev* desc,
+ struct PP_CompletionCallback callback) {
+ VLOG(4) << "PPB_TrueTypeFont_Dev::Describe()";
EnterResource<PPB_TrueTypeFont_API> enter(font, callback, true);
if (enter.failed())
return enter.retval();
@@ -51,8 +59,9 @@ 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) {
+ VLOG(4) << "PPB_TrueTypeFont_Dev::GetTableTags()";
EnterResource<PPB_TrueTypeFont_API> enter(font, callback, true);
if (enter.failed())
return enter.retval();
@@ -64,8 +73,9 @@ 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) {
+ VLOG(4) << "PPB_TrueTypeFont_Dev::GetTable()";
EnterResource<PPB_TrueTypeFont_API> enter(font, callback, true);
if (enter.failed())
return enter.retval();
@@ -76,10 +86,10 @@ 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,
+ &IsTrueTypeFont,
&Describe,
&GetTableTags,
&GetTable
@@ -88,7 +98,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
« no previous file with comments | « ppapi/tests/test_truetype_font.cc ('k') | ppapi/thunk/ppb_truetype_font_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698