diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 13:34:08 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 13:34:08 +0000 |
commit | c708db4675caea8773ccf88a5762d33035073e2d (patch) | |
tree | 643c56b05e66b960af36fc8964be555dc6a3554c /remoting/client/plugin/pepper_util.h | |
parent | 0520e8a4859a2bb806638c00aa03daf5612d50dc (diff) | |
download | chromium_src-c708db4675caea8773ccf88a5762d33035073e2d.zip chromium_src-c708db4675caea8773ccf88a5762d33035073e2d.tar.gz chromium_src-c708db4675caea8773ccf88a5762d33035073e2d.tar.bz2 |
Reapply r51857 to start building chromoting plugin. Update for ppapi changes.
This should work now after the ppapi roll to r164 that fixes the
-fvisibility=hidden being removed in the linux shlib build.
Original Review here: http://codereview.chromium.org/2858037
BUG=none
TEST=try bots + local run of PPAPITest with a shared_library build.
Review URL: http://codereview.chromium.org/3038001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52658 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/plugin/pepper_util.h')
-rw-r--r-- | remoting/client/plugin/pepper_util.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/remoting/client/plugin/pepper_util.h b/remoting/client/plugin/pepper_util.h new file mode 100644 index 0000000..6c6cfb0 --- /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_ |