summaryrefslogtreecommitdiffstats
path: root/ppapi/thunk
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-26 19:28:47 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-26 19:28:47 +0000
commit15b1224dc8e1918d0aa534676e65c802617a739b (patch)
tree3c7f85eb4fe1338a824b702139cdd0d025ba1651 /ppapi/thunk
parentd6d971b26a2a174c4142560999c3f0ad5c33d6d9 (diff)
downloadchromium_src-15b1224dc8e1918d0aa534676e65c802617a739b.zip
chromium_src-15b1224dc8e1918d0aa534676e65c802617a739b.tar.gz
chromium_src-15b1224dc8e1918d0aa534676e65c802617a739b.tar.bz2
Revert 119200 - Revert 119198 - First pass at implementing the MessageLoop interface. This includes a simple
example and a helper class. The current example just asserts due to thread checks we have in there now, but this should provide a good starting point. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/9097006 TBR=brettw@chromium.org Review URL: https://chromiumcodereview.appspot.com/9290040 TBR=brettw@chromium.org Review URL: https://chromiumcodereview.appspot.com/9234068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119268 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r--ppapi/thunk/ppb_message_loop_api.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/ppapi/thunk/ppb_message_loop_api.h b/ppapi/thunk/ppb_message_loop_api.h
new file mode 100644
index 0000000..36f2f1a
--- /dev/null
+++ b/ppapi/thunk/ppb_message_loop_api.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2012 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.
+
+#ifndef PPAPI_THUNK_PPB_MESSAGE_LOOP_API_H_
+#define PPAPI_THUNK_PPB_MESSAGE_LOOP_API_H_
+
+namespace ppapi {
+namespace thunk {
+
+class PPB_MessageLoop_API {
+ public:
+ virtual ~PPB_MessageLoop_API() {}
+
+ virtual int32_t AttachToCurrentThread() = 0;
+ virtual int32_t Run() = 0;
+ virtual int32_t PostWork(PP_CompletionCallback callback,
+ int64_t delay_ms) = 0;
+ virtual int32_t PostQuit(PP_Bool should_destroy) = 0;
+};
+
+} // namespace thunk
+} // namespace ppapi
+
+#endif // PPAPI_THUNK_PPB_MESSAGE_LOOP_API_H_