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

Unified Diff: native_client_sdk/src/libraries/ppapi_simple/ps.cc

Issue 15011003: ppapi_simple (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits, rename Created 7 years, 7 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.cc
diff --git a/native_client_sdk/src/libraries/ppapi_main/ppapi_main.cc b/native_client_sdk/src/libraries/ppapi_simple/ps.cc
similarity index 57%
rename from native_client_sdk/src/libraries/ppapi_main/ppapi_main.cc
rename to native_client_sdk/src/libraries/ppapi_simple/ps.cc
index 3d666c910fb04a44799cb6bbaae1b8bbbe03090f..53f2687558ae6c1e0607cdb564eee956b79b7193 100644
--- a/native_client_sdk/src/libraries/ppapi_main/ppapi_main.cc
+++ b/native_client_sdk/src/libraries/ppapi_simple/ps.cc
@@ -9,50 +9,29 @@
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h"
-#include "ppapi_main/ppapi_instance.h"
-#include "ppapi_main/ppapi_instance3d.h"
-#include "ppapi_main/ppapi_main.h"
-
+#include "ppapi_simple/ps.h"
static pp::Instance* s_Instance = NULL;
-
-// Helpers to access PPAPI interfaces
-void* PPAPI_GetInstanceObject() {
- return s_Instance;
-}
-
-PP_Instance PPAPI_GetInstanceId() {
+PP_Instance PSGetInstanceId() {
return s_Instance->pp_instance();
}
-const void* PPAPI_GetInterface(const char *name) {
+const void* PSGetInterface(const char *name) {
return pp::Module::Get()->GetBrowserInterface(name);
}
-void* PPAPI_CreateInstance(PP_Instance inst, const char *args[]) {
- return static_cast<void*>(new PPAPIInstance(inst, args));
-}
-
-PPAPIEvent* PPAPI_AcquireEvent() {
- return static_cast<PPAPIInstance*>(s_Instance)->AcquireInputEvent();
-}
-
-void PPAPI_ReleaseEvent(PPAPIEvent* event) {
- static_cast<PPAPIInstance*>(s_Instance)->ReleaseInputEvent(event);
-}
-
/// The Module class. The browser calls the CreateInstance() method to create
/// an instance of your NaCl module on the web page. The browser creates a new
/// instance for each <embed> tag with type="application/x-nacl".
-class PPAPIMainModule : public pp::Module {
+class PSModule : public pp::Module {
public:
- PPAPIMainModule() : pp::Module() {}
- virtual ~PPAPIMainModule() {}
+ PSModule() : pp::Module() {}
+ virtual ~PSModule() {}
virtual pp::Instance* CreateInstance(PP_Instance instance) {
- s_Instance = static_cast<pp::Instance*>(UserCreateInstance(instance));
+ s_Instance = static_cast<pp::Instance*>(PSUserCreateInstance(instance));
return s_Instance;
}
};
@@ -64,7 +43,7 @@ namespace pp {
/// is one instance per <embed> tag on the page. This is the main binding
/// point for your NaCl module with the browser.
Module* CreateModule() {
- return new PPAPIMainModule();
+ return new PSModule();
}
} // namespace pp

Powered by Google App Engine
This is Rietveld 408576698