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

Side by Side Diff: ppapi/c/pp_completion_callback.h

Issue 6656016: Add some more documentation from a recent ppapi discussion.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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/c/ppb_core.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 #ifndef PPAPI_C_PP_COMPLETION_CALLBACK_H_ 5 #ifndef PPAPI_C_PP_COMPLETION_CALLBACK_H_
6 #define PPAPI_C_PP_COMPLETION_CALLBACK_H_ 6 #define PPAPI_C_PP_COMPLETION_CALLBACK_H_
7 7
8 /** 8 /**
9 * @file 9 * @file
10 * Defines the API ... 10 * Defines the API ...
(...skipping 14 matching lines...) Expand all
25 */ 25 */
26 26
27 /** 27 /**
28 * @addtogroup Structs 28 * @addtogroup Structs
29 * @{ 29 * @{
30 */ 30 */
31 31
32 /** 32 /**
33 * Any method that takes a PP_CompletionCallback has the option of completing 33 * Any method that takes a PP_CompletionCallback has the option of completing
34 * asynchronously if the operation would block. Such a method should return 34 * asynchronously if the operation would block. Such a method should return
35 * PP_Error_WouldBlock to indicate when the method will complete 35 * PP_ERROR_WOULDBLOCK to indicate that the method will complete
36 * asynchronously. If the completion callback is NULL, then the operation will 36 * asynchronously. In this case it will signal completion by invoking the
37 * block if necessary to complete its work. PP_BlockUntilComplete() provides a 37 * supplied completion callback, which will always be invoked from the main
38 * convenient way to specify blocking behavior. 38 * PPAPI thread of execution. If the method returns any other value,
39 * including PP_OK, the completion callback will not be invoked. If the
40 * completion callback is NULL, then the method will block if necessary to
41 * complete its work. PP_BlockUntilComplete() provides a convenient way to
42 * specify blocking behavior.
39 * 43 *
40 * The result parameter passes an int32_t that if negative indicates an error 44 * The result parameter passes an int32_t that if negative indicates an error
41 * code. Otherwise the result value indicates success. If it is a positive 45 * code. Otherwise the result value indicates success. If it is a positive
42 * value then it may carry additional information. 46 * value then it may carry additional information.
43 */ 47 */
44 struct PP_CompletionCallback { 48 struct PP_CompletionCallback {
45 PP_CompletionCallback_Func func; 49 PP_CompletionCallback_Func func;
46 void* user_data; 50 void* user_data;
47 }; 51 };
48 /** 52 /**
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 */ 93 */
90 PP_INLINE struct PP_CompletionCallback PP_BlockUntilComplete() { 94 PP_INLINE struct PP_CompletionCallback PP_BlockUntilComplete() {
91 return PP_MakeCompletionCallback(NULL, NULL); 95 return PP_MakeCompletionCallback(NULL, NULL);
92 } 96 }
93 /** 97 /**
94 * @} 98 * @}
95 */ 99 */
96 100
97 #endif /* PPAPI_C_PP_COMPLETION_CALLBACK_H_ */ 101 #endif /* PPAPI_C_PP_COMPLETION_CALLBACK_H_ */
98 102
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/ppb_core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698