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

Unified Diff: remoting/client/plugin/pepper_util.h

Issue 3038001: Reapply r51857 to start building chromoting plugin. Update for ppapi changes. (Closed)
Patch Set: rebased correctly. Created 10 years, 5 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
« no previous file with comments | « remoting/client/plugin/pepper_entrypoints.cc ('k') | remoting/client/plugin/pepper_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/pepper_util.h
diff --git a/remoting/client/plugin/pepper_util.h b/remoting/client/plugin/pepper_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..6c6cfb05bf25b6ffd042b0e02f1c37fcdaebef4f
--- /dev/null
+++ b/remoting/client/plugin/pepper_util.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2010 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 REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_
+#define REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_
+
+#include "base/basictypes.h"
+
+#include "third_party/ppapi/cpp/completion_callback.h"
+
+class Task;
+
+namespace remoting {
+
+// Function for adapting a Chromium style Task into a
+// PP_CompletionCallback friendly function. The Task object should be passed
+// as |user_data|. This function will invoke Task::Run() on |user_data| when
+// called, and then delete |user_data|.
+void CompletionCallbackTaskAdapter(void* user_data, int32_t not_used);
+
+// Converts a Task* to a pp::CompletionCallback suitable for use with ppapi C++
+// APIs that require a pp::CompletionCallback. Takes ownership of |task|.
+pp::CompletionCallback TaskToCompletionCallback(Task* task);
+
+// Posts the current task to the plugin's main thread. Takes ownership of
+// |task|.
+void RunTaskOnPluginThread(Task* task);
+
+} // namespace remoting
+
+#endif // REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_
« no previous file with comments | « remoting/client/plugin/pepper_entrypoints.cc ('k') | remoting/client/plugin/pepper_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698