OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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 | 5 |
6 /* From ppb_message_loop.idl modified Thu May 9 14:59:57 2013. */ | 6 /* From ppb_message_loop.idl modified Thu May 9 14:59:57 2013. */ |
7 | 7 |
8 #ifndef PPAPI_C_PPB_MESSAGE_LOOP_H_ | 8 #ifndef PPAPI_C_PPB_MESSAGE_LOOP_H_ |
9 #define PPAPI_C_PPB_MESSAGE_LOOP_H_ | 9 #define PPAPI_C_PPB_MESSAGE_LOOP_H_ |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 * (You can also create the message loop resource on the background thread, | 69 * (You can also create the message loop resource on the background thread, |
70 * but then the main thread will have no reference to it should you want to | 70 * but then the main thread will have no reference to it should you want to |
71 * call PostWork()). | 71 * call PostWork()). |
72 * | 72 * |
73 * | 73 * |
74 * THREAD HANDLING | 74 * THREAD HANDLING |
75 * | 75 * |
76 * The main thread has an implicitly created message loop. The main thread is | 76 * The main thread has an implicitly created message loop. The main thread is |
77 * the thread where PPP_InitializeModule and PPP_Instance functions are called. | 77 * the thread where PPP_InitializeModule and PPP_Instance functions are called. |
78 * You can retrieve a reference to this message loop by calling | 78 * You can retrieve a reference to this message loop by calling |
79 * GetForMainThread() or, if your code is on the main thread, | 79 * GetForMainThread() or, if your code is on the main thread, GetCurrent() will |
80 * GetForCurrentThread() will also work. | 80 * also work. |
81 * | 81 * |
82 * Some special threads created by the system can not have message loops. In | 82 * Some special threads created by the system can not have message loops. In |
83 * particular, the background thread created for audio processing has this | 83 * particular, the background thread created for audio processing has this |
84 * requirement because it's intended to be highly responsive to keep up with | 84 * requirement because it's intended to be highly responsive to keep up with |
85 * the realtime requirements of audio processing. You can not make PPAPI calls | 85 * the realtime requirements of audio processing. You can not make PPAPI calls |
86 * from these threads. | 86 * from these threads. |
87 * | 87 * |
88 * Once you associate a message loop with a thread, you don't have to keep a | 88 * Once you associate a message loop with a thread, you don't have to keep a |
89 * reference to it. The system will hold a reference to the message loop for as | 89 * reference to it. The system will hold a reference to the message loop for as |
90 * long as the thread is running. The current message loop can be retrieved | 90 * long as the thread is running. The current message loop can be retrieved |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 int32_t (*PostQuit)(PP_Resource message_loop, PP_Bool should_destroy); | 282 int32_t (*PostQuit)(PP_Resource message_loop, PP_Bool should_destroy); |
283 }; | 283 }; |
284 | 284 |
285 typedef struct PPB_MessageLoop_1_0 PPB_MessageLoop; | 285 typedef struct PPB_MessageLoop_1_0 PPB_MessageLoop; |
286 /** | 286 /** |
287 * @} | 287 * @} |
288 */ | 288 */ |
289 | 289 |
290 #endif /* PPAPI_C_PPB_MESSAGE_LOOP_H_ */ | 290 #endif /* PPAPI_C_PPB_MESSAGE_LOOP_H_ */ |
291 | 291 |
OLD | NEW |