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

Unified Diff: ppapi/thunk/ppb_flash_font_file_thunk.cc

Issue 1416643002: Enable pp::flash::FontFile support on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Based generated thunk files Created 5 years, 2 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_flash_font_file_thunk.cc
diff --git a/ppapi/thunk/ppb_flash_font_file_thunk.cc b/ppapi/thunk/ppb_flash_font_file_thunk.cc
index 3a073657a60f873f116ffb6c694a31a4535f9642..aaa81fa41957ffa8f6b185733375cef94fb52383 100644
--- a/ppapi/thunk/ppb_flash_font_file_thunk.cc
+++ b/ppapi/thunk/ppb_flash_font_file_thunk.cc
@@ -2,11 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// From private/ppb_flash_font_file.idl modified Thu Oct 22 22:02:40 2015.
+
+#include "ppapi/c/pp_errors.h"
#include "ppapi/c/private/ppb_flash_font_file.h"
+#include "ppapi/shared_impl/tracked_callback.h"
#include "ppapi/thunk/enter.h"
+#include "ppapi/thunk/ppapi_thunk_export.h"
#include "ppapi/thunk/ppb_flash_font_file_api.h"
-#include "ppapi/thunk/resource_creation_api.h"
-#include "ppapi/thunk/thunk.h"
namespace ppapi {
namespace thunk {
@@ -14,8 +17,9 @@ namespace thunk {
namespace {
PP_Resource Create(PP_Instance instance,
- const PP_BrowserFont_Trusted_Description* description,
+ const struct PP_BrowserFont_Trusted_Description* description,
PP_PrivateFontCharset charset) {
+ VLOG(4) << "PPB_Flash_FontFile::Create()";
EnterResourceCreation enter(instance);
if (enter.failed())
return 0;
@@ -23,6 +27,7 @@ PP_Resource Create(PP_Instance instance,
}
PP_Bool IsFlashFontFile(PP_Resource resource) {
+ VLOG(4) << "PPB_Flash_FontFile::IsFlashFontFile()";
EnterResource<PPB_Flash_FontFile_API> enter(resource, false);
return PP_FromBool(enter.succeeded());
}
@@ -31,22 +36,34 @@ PP_Bool GetFontTable(PP_Resource font_file,
uint32_t table,
void* output,
uint32_t* output_length) {
+ VLOG(4) << "PPB_Flash_FontFile::GetFontTable()";
EnterResource<PPB_Flash_FontFile_API> enter(font_file, true);
if (enter.failed())
return PP_FALSE;
return enter.object()->GetFontTable(table, output, output_length);
}
-const PPB_Flash_FontFile g_ppb_flash_fontfile_thunk = {
- &Create,
- &IsFlashFontFile,
- &GetFontTable
-};
+PP_Bool IsSupportedForWindows(void) {
+ VLOG(4) << "PPB_Flash_FontFile::IsSupportedForWindows()";
+ return PP_TRUE;
+}
+
+const PPB_Flash_FontFile_0_1 g_ppb_flash_fontfile_thunk_0_1 = {
+ &Create, &IsFlashFontFile, &GetFontTable};
+
+const PPB_Flash_FontFile_0_2 g_ppb_flash_fontfile_thunk_0_2 = {
+ &Create, &IsFlashFontFile, &GetFontTable, &IsSupportedForWindows};
} // namespace
-const PPB_Flash_FontFile_0_1* GetPPB_Flash_FontFile_0_1_Thunk() {
- return &g_ppb_flash_fontfile_thunk;
+PPAPI_THUNK_EXPORT const PPB_Flash_FontFile_0_1*
+GetPPB_Flash_FontFile_0_1_Thunk() {
+ return &g_ppb_flash_fontfile_thunk_0_1;
+}
+
+PPAPI_THUNK_EXPORT const PPB_Flash_FontFile_0_2*
+GetPPB_Flash_FontFile_0_2_Thunk() {
+ return &g_ppb_flash_fontfile_thunk_0_2;
}
} // namespace thunk

Powered by Google App Engine
This is Rietveld 408576698