Index: ppapi/cpp/message_loop.h |
diff --git a/ppapi/cpp/message_loop.h b/ppapi/cpp/message_loop.h |
index 9e28b2d835b18b3d92786e78c7750b4545934446..c1e217bbe36663697ec96e75fa79b71553a9760f 100644 |
--- a/ppapi/cpp/message_loop.h |
+++ b/ppapi/cpp/message_loop.h |
@@ -7,6 +7,9 @@ |
#include "ppapi/cpp/resource.h" |
+/// @file |
+/// This file defines the PPB_MessageLoop API. |
+ |
namespace pp { |
class CompletionCallback; |
@@ -39,13 +42,15 @@ class InstanceHandle; |
/// - Call Run() with the message loop resource. |
/// |
/// Your callbacks should look like this: |
-/// void DoMyWork(void* user_data, int32_t status) { |
-/// if (status != PP_OK) { |
-/// Cleanup(); // e.g. free user_data. |
-/// return; |
-/// } |
-/// ... do your work... |
-/// } |
+/// @code |
+/// void DoMyWork(void* user_data, int32_t status) { |
+/// if (status != PP_OK) { |
+/// Cleanup(); // e.g. free user_data. |
+/// return; |
+/// } |
+/// ... do your work... |
+/// } |
+/// @endcode |
/// For a C++ example, see ppapi/utility/threading/simple_thread.h |
/// |
/// (You can also create the message loop resource on the background thread, |
@@ -116,12 +121,12 @@ class InstanceHandle; |
/// Therefore, you should check for errors from PostWork and destroy any |
/// associated memory to avoid leaks. If you're using the C++ |
/// CompletionCallbackFactory, use the following pattern: |
-/// |
-/// pp::CompletionCallback callback = factory_.NewOptionalCallback(...); |
-/// int32_t result = message_loop.PostWork(callback); |
-/// if (result != PP_OK) |
-/// callback.Run(result); |
-/// |
+/// @code |
+/// pp::CompletionCallback callback = factory_.NewOptionalCallback(...); |
+/// int32_t result = message_loop.PostWork(callback); |
+/// if (result != PP_OK) |
+/// callback.Run(result); |
+/// @endcode |
/// This will run the callback with an error value, and assumes that the |
/// implementation of your callback checks the "result" argument and returns |
/// immediately on error. |