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

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

Issue 15011003: ppapi_simple (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove raw 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/ppapi_event.cc
diff --git a/native_client_sdk/src/libraries/ppapi_simple/ppapi_event.cc b/native_client_sdk/src/libraries/ppapi_simple/ppapi_event.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b31e286705e09fc345071f1f637e4f6b2329bf86
--- /dev/null
+++ b/native_client_sdk/src/libraries/ppapi_simple/ppapi_event.cc
@@ -0,0 +1,45 @@
+/* Copyright (c) 2013 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_instance.h"
+#include "ppapi/c/pp_module.h"
+
+#include "ppapi_simple/ppapi_event.h"
+#include "ppapi_simple/ppapi_simple_instance.h"
+#include "ppapi_simple/ppapi_simple_main.h"
+
+
+void PSPostEvent(PSEventType type) {
+ PSInstance::GetInstance()->PostEvent(type);
+}
+
+void PSPostBoolEvent(PSEventType type, PP_Bool state) {
+ PSInstance::GetInstance()->PostEvent(type, state);
+}
+
+void PSPostVarEvent(PSEventType type, struct PP_Var var) {
+ PSInstance::GetInstance()->PostEvent(type, var);
+}
+
+void PSPostResourceEvent(PSEventType type, PP_Resource resource) {
+ PSInstance::GetInstance()->PostEvent(type, resource);
+}
+
+PSEvent* PSTryToAcquireEvent() {
+ return PSInstance::GetInstance()->TryAcquireEvent();
+}
+
+PSEvent* PSWaitForAcquireEvent() {
Sam Clegg 2013/05/29 04:48:25 How about naming these just PSEventPoll() and
noelallen_use_chromium 2013/05/30 00:25:07 Done.
+ return PSInstance::GetInstance()->WaitAcquireEvent();
+}
+
+void PSReleaseEvent(PSEvent* event) {
+ PSInstance::GetInstance()->ReleaseEvent(event);
+}
+
+void PSSetEventFilter(uint32_t filter) {
+ PSInstance::GetInstance()->SetEnabledEvents(filter);
+}
+

Powered by Google App Engine
This is Rietveld 408576698