| 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 #ifndef PPAPI_CPP_COMPLETION_CALLBACK_H_ | 5 #ifndef PPAPI_CPP_COMPLETION_CALLBACK_H_ |
| 6 #define PPAPI_CPP_COMPLETION_CALLBACK_H_ | 6 #define PPAPI_CPP_COMPLETION_CALLBACK_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_completion_callback.h" | 8 #include "ppapi/c/pp_completion_callback.h" |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/cpp/logging.h" | 10 #include "ppapi/cpp/logging.h" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 private: | 248 private: |
| 249 OutputStorageType* output_; | 249 OutputStorageType* output_; |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 /// BlockUntilComplete() is used in place of an actual completion callback | 252 /// BlockUntilComplete() is used in place of an actual completion callback |
| 253 /// to request blocking behavior. If specified, the calling thread will block | 253 /// to request blocking behavior. If specified, the calling thread will block |
| 254 /// until the function completes. Blocking completion callbacks are only | 254 /// until the function completes. Blocking completion callbacks are only |
| 255 /// allowed from background threads. | 255 /// allowed from background threads. |
| 256 /// | 256 /// |
| 257 /// @return A <code>CompletionCallback</code> corresponding to a NULL callback. | 257 /// @return A <code>CompletionCallback</code> corresponding to a NULL callback. |
| 258 CompletionCallback BlockUntilComplete(); | 258 inline CompletionCallback BlockUntilComplete() { |
| 259 // Note: Explicitly inlined to avoid link errors when included into |
| 260 // ppapi_proxy and ppapi_cpp_objects. |
| 261 return CompletionCallback(); |
| 262 } |
| 259 | 263 |
| 260 } // namespace pp | 264 } // namespace pp |
| 261 | 265 |
| 262 #endif // PPAPI_CPP_COMPLETION_CALLBACK_H_ | 266 #endif // PPAPI_CPP_COMPLETION_CALLBACK_H_ |
| OLD | NEW |