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

Side by Side Diff: remoting/client/plugin/pepper_util.cc

Issue 2858037: Integrating back into using the external ppapi/cpp wrappers. (Closed) Base URL: git://codf21.jail.google.com/chromium.git
Patch Set: fin 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 unified diff | Download patch
« no previous file with comments | « remoting/client/plugin/pepper_util.h ('k') | remoting/client/plugin/pepper_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "remoting/client/plugin/pepper_util.h"
6
7 #include "base/task.h"
8 #include "third_party/ppapi/c/pp_completion_callback.h"
9 #include "third_party/ppapi/cpp/module.h"
10
11 namespace remoting {
12
13 void CompletionCallbackTaskAdapter(void* user_data, int32_t not_used) {
14 Task* task = reinterpret_cast<Task*>(user_data);
15 task->Run();
16 delete task;
17 }
18
19 pp::CompletionCallback TaskToCompletionCallback(Task* task) {
20 return pp::CompletionCallback(&CompletionCallbackTaskAdapter, task);
21 }
22
23 void RunTaskOnPluginThread(Task* task) {
24 pp::Module::Get()->core()->CallOnMainThread(
25 0 /* run immediately */,
26 TaskToCompletionCallback(task),
27 0 /* unused value */
28 );
29 }
30
31 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_util.h ('k') | remoting/client/plugin/pepper_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698