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

Unified Diff: ppapi/cpp/dev/message_loop_dev.h

Issue 8965082: Add API definition and error values for running message loops. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New patch Created 8 years, 11 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/cpp/dev/message_loop_dev.h
diff --git a/ppapi/cpp/dev/message_loop_dev.h b/ppapi/cpp/dev/message_loop_dev.h
new file mode 100644
index 0000000000000000000000000000000000000000..b3eb79113c7df3f7782dd2477bf1ca020fe6ba74
--- /dev/null
+++ b/ppapi/cpp/dev/message_loop_dev.h
@@ -0,0 +1,40 @@
+// 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_CPP_DEV_MESSAGE_LOOP_DEV_H_
+#define PPAPI_CPP_DEV_MESSAGE_LOOP_DEV_H_
+
+#include "ppapi/cpp/resource.h"
+
+namespace pp {
+
+class CompletionCallback;
+class Instance;
+
+class MessageLoop_Dev : public Resource {
+ public:
+ // Creates an is_null() MessageLoop resource.
+ MessageLoop_Dev();
+
+ // Creates a message loop associated with the given instance. The resource
+ // will be is_null() on failure.
+ MessageLoop_Dev(Instance* instance);
+
+ // Constructors from an existing resource.
+ MessageLoop_Dev(const MessageLoop_Dev& other);
+ MessageLoop_Dev(PP_Resource pp_message_loop);
dmichael (off chromium) 2012/01/18 21:16:53 Is it worth noting that the MessageLoop_Dev takes
+
+ static MessageLoop_Dev GetForMainThread();
+ static MessageLoop_Dev GetCurrent();
+
+ int32_t AttachToCurrentThread();
+ int32_t Run();
+ int32_t PostWork(const CompletionCallback& callback,
+ int64_t delay_ms = 0);
+ int32_t PostQuit(bool should_destroy);
dmichael (off chromium) 2012/01/18 21:16:53 you should adapt the comments from the C file, onc
+};
+
+} // namespace pp
+
+#endif // PPAPI_CPP_DEV_MESSAGE_LOOP_DEV_H_

Powered by Google App Engine
This is Rietveld 408576698