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

Unified Diff: native_client_sdk/src/libraries/ppapi_simple/ps_entrypoints_c.c

Issue 914983003: [NaCl SDK] Switch ppapi_simple to C library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix sdk_files.list for mac Created 5 years, 10 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: native_client_sdk/src/libraries/ppapi_simple/ps_entrypoints_c.c
diff --git a/native_client_sdk/src/libraries/ppapi_simple/ps_entrypoints_c.c b/native_client_sdk/src/libraries/ppapi_simple/ps_entrypoints_c.c
new file mode 100644
index 0000000000000000000000000000000000000000..0588e0968bdebea17157e20e20a0f15342dce8b6
--- /dev/null
+++ b/native_client_sdk/src/libraries/ppapi_simple/ps_entrypoints_c.c
@@ -0,0 +1,27 @@
+/* Copyright (c) 2015 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file. */
+
+#include <ppapi/c/pp_errors.h>
+#include <ppapi/c/pp_module.h>
+#include <ppapi/c/ppb.h>
+
+#include "ppapi_simple/ps_interface.h"
+
+/* Defined in ps_instance.c. */
+const void* PSGetInterfaceImplementation(const char*);
+
+extern PPB_GetInterface g_ps_get_interface;
Sam Clegg 2015/02/20 17:33:12 Can we use headers declarations here instead? (a
+
+int32_t PPP_InitializeModule(PP_Module module, PPB_GetInterface get_interface) {
+ g_ps_get_interface = get_interface;
+ PSInterfaceInit();
+ return PP_OK;
+}
+
+const void* PPP_GetInterface(const char* interface_name) {
+ return PSGetInterfaceImplementation(interface_name);
+}
+
+void PPP_ShutdownModule(void) {
+}

Powered by Google App Engine
This is Rietveld 408576698