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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/browser_callback.h

Issue 7740013: Cloning a bunch of stuff from the native_client repository at r6528 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ppapi/native_client/src/shared/ppapi_proxy/browser_callback.cc » ('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) 2011 The Native Client 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 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_CALLBACK_H_
6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_CALLBACK_H_
7
8 #include "native_client/src/include/portability.h"
9 #include "native_client/src/trusted/service_runtime/include/machine/_types.h"
10
11 struct NaClSrpcChannel;
12 struct PP_CompletionCallback;
13
14 namespace ppapi_proxy {
15
16 // Pointer to function to evaluate the result of a read operation.
17 typedef bool (*CheckResultFunc)(int32_t result);
18 // Pointer to function to retrieve/calculate the size read.
19 typedef nacl_abi_size_t (*GetReadSizeFunc)(int32_t result);
20
21 // Returns a PP_CompletionCallback that will call the remote implementation of
22 // a callback by |callback_id| on the plugin side on |srpc_channel|.
23 // This callback allows for optimized synchronous completion.
24 // Allocates data that will be deleted by the underlying callback function.
25 // Returns NULL callback on failure.
26 struct PP_CompletionCallback MakeRemoteCompletionCallback(
27 NaClSrpcChannel* srpc_channel,
28 int32_t callback_id);
29 struct PP_CompletionCallback MakeRemoteCompletionCallback(
30 NaClSrpcChannel* srpc_channel,
31 int32_t callback_id,
32 // For callbacks invoked on a byte read.
33 int32_t bytes_to_read,
34 char** buffer);
35 struct PP_CompletionCallback MakeRemoteCompletionCallback(
36 NaClSrpcChannel* srpc_channel,
37 int32_t callback_id,
38 // For callbacks invoked on a byte read.
39 int32_t bytes_to_read,
40 char** buffer,
41 CheckResultFunc check_result,
42 GetReadSizeFunc get_size_read_func);
43
44 // If the callback won't be called, use this to clean up the data from
45 // the function above.
46 void DeleteRemoteCallbackInfo(struct PP_CompletionCallback callback);
47
48 } // namespace ppapi_proxy
49
50 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_CALLBACK_H_
OLDNEW
« no previous file with comments | « no previous file | ppapi/native_client/src/shared/ppapi_proxy/browser_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698