diff options
author | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-09 18:40:17 +0000 |
---|---|---|
committer | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-09 18:40:17 +0000 |
commit | febbb9cf554e724bef222f1306902b78a6ec1f16 (patch) | |
tree | 906c50cfe65bb74e3a04858acb86da3c0c04b41d | |
parent | 56fa0311640a37251637f115a0f58f99c1d97ff9 (diff) | |
download | chromium_src-febbb9cf554e724bef222f1306902b78a6ec1f16.zip chromium_src-febbb9cf554e724bef222f1306902b78a6ec1f16.tar.gz chromium_src-febbb9cf554e724bef222f1306902b78a6ec1f16.tar.bz2 |
[PPAPI] Documentation fixes.
* I added a closing </code> tag in r191189, but it seems to be more consistent
to forgo <code> tags for enums, so I've removed it.
* I've also added @code/@endcode around a snippet of code that was flattened
otherwise.
BUG=none
R=dmichael@chromium.org
Review URL: https://codereview.chromium.org/13238002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193162 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ppapi/api/pp_completion_callback.idl | 16 | ||||
-rw-r--r-- | ppapi/api/ppb_graphics_3d.idl | 16 | ||||
-rw-r--r-- | ppapi/api/ppb_input_event.idl | 8 | ||||
-rw-r--r-- | ppapi/api/ppb_message_loop.idl | 2 | ||||
-rw-r--r-- | ppapi/api/private/ppb_content_decryptor_private.idl | 2 | ||||
-rw-r--r-- | ppapi/c/pp_completion_callback.h | 18 | ||||
-rw-r--r-- | ppapi/c/ppb_graphics_3d.h | 16 | ||||
-rw-r--r-- | ppapi/c/ppb_input_event.h | 8 | ||||
-rw-r--r-- | ppapi/c/ppb_message_loop.h | 4 | ||||
-rw-r--r-- | ppapi/c/private/ppb_content_decryptor_private.h | 4 | ||||
-rw-r--r-- | ppapi/cpp/graphics_3d.h | 4 | ||||
-rw-r--r-- | ppapi/cpp/input_event.h | 4 | ||||
-rw-r--r-- | ppapi/cpp/instance.h | 20 | ||||
-rw-r--r-- | ppapi/cpp/logging.h | 4 | ||||
-rw-r--r-- | ppapi/cpp/mouse_lock.h | 8 |
15 files changed, 69 insertions, 65 deletions
diff --git a/ppapi/api/pp_completion_callback.idl b/ppapi/api/pp_completion_callback.idl index 871a135..46b6342 100644 --- a/ppapi/api/pp_completion_callback.idl +++ b/ppapi/api/pp_completion_callback.idl @@ -66,10 +66,10 @@ enum PP_CompletionCallback_Flag { * ways: * - Required: The callback will always be invoked asynchronously on the * thread where the associated PPB method was invoked. The method - * will always return <code>PP_OK_COMPLETIONPENDING</code> when a - * required callback, and the callback will be invoked later - * (barring system or thread shutdown; see PPB_MessageLoop for - * details). Required callbacks are the default. + * will always return PP_OK_COMPLETIONPENDING when a required + * callback, and the callback will be invoked later (barring + * system or thread shutdown; see PPB_MessageLoop for details). + * Required callbacks are the default. * * NOTE: If you use a required callback on a background thread, * you must have created and attached a PPB_MessageLoop. @@ -141,16 +141,16 @@ enum PP_CompletionCallback_Flag { * * <strong>Example, creating a Required callback:</strong> * - * <code> + * @code * struct PP_CompletionCallback cc = PP_MakeCompletionCallback(Foo, NULL); - * </code> + * @endcode * * <strong>Example, creating an Optional callback:</strong> * - * <code> + * @code * struct PP_CompletionCallback cc = PP_MakeCompletionCallback(Foo, NULL); * cc.flags = cc.flags | PP_COMPLETIONCALLBACK_FLAG_OPTIONAL; - * </code> + * @endcode * * @param[in] func A <code>PP_CompletionCallback_Func</code> that will be * called. diff --git a/ppapi/api/ppb_graphics_3d.idl b/ppapi/api/ppb_graphics_3d.idl index fc13a09..28a0c40 100644 --- a/ppapi/api/ppb_graphics_3d.idl +++ b/ppapi/api/ppb_graphics_3d.idl @@ -24,25 +24,25 @@ label Chrome { * <strong>Example usage from plugin code:</strong> * * <strong>Setup:</strong> - * <code> + * @code * PP_Resource context; * int32_t attribs[] = {PP_GRAPHICS3DATTRIB_WIDTH, 800, * PP_GRAPHICS3DATTRIB_HEIGHT, 800, * PP_GRAPHICS3DATTRIB_NONE}; * context = g3d->Create(instance, attribs, &context); * inst->BindGraphics(instance, context); - * </code> + * @endcode * * <strong>Present one frame:</strong> - * <code> + * @code * gles2->Clear(context, GL_COLOR_BUFFER); * g3d->SwapBuffers(context); - * </code> + * @endcode * * <strong>Shutdown:</strong> - * <code> + * @code * core->ReleaseResource(context); - * </code> + * @endcode */ [macro="PPB_GRAPHICS_3D_INTERFACE"] interface PPB_Graphics3D { @@ -170,7 +170,7 @@ interface PPB_Graphics3D { * * <strong>Example usage:</strong> To get the values for rgb bits in the * color buffer, this function must be called as following: - * <code> + * @code * int attrib_list[] = {PP_GRAPHICS3DATTRIB_RED_SIZE, 0, * PP_GRAPHICS3DATTRIB_GREEN_SIZE, 0, * PP_GRAPHICS3DATTRIB_BLUE_SIZE, 0, @@ -179,7 +179,7 @@ interface PPB_Graphics3D { * int red_bits = attrib_list[1]; * int green_bits = attrib_list[3]; * int blue_bits = attrib_list[5]; - * </code> + * @endcode */ int32_t GetAttribs( [in] PP_Resource context, diff --git a/ppapi/api/ppb_input_event.idl b/ppapi/api/ppb_input_event.idl index 083b62e..e50a879 100644 --- a/ppapi/api/ppb_input_event.idl +++ b/ppapi/api/ppb_input_event.idl @@ -320,11 +320,11 @@ interface PPB_InputEvent { * a crack at the message. * * <strong>Example:</strong> - * <code> + * @code * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); * RequestFilteringInputEvents(instance, * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); - * </code> + * @endcode * * @param instance The <code>PP_Instance</code> of the instance requesting * the given events. @@ -363,11 +363,11 @@ interface PPB_InputEvent { * can have significant overhead. * * <strong>Example:</strong> - * <code> + * @code * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); * RequestFilteringInputEvents(instance, * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); - * </code> + * @endcode * * @return <code>PP_OK</code> if the operation succeeded, * <code>PP_ERROR_BADARGUMENT</code> if instance is invalid, or diff --git a/ppapi/api/ppb_message_loop.idl b/ppapi/api/ppb_message_loop.idl index fad873a..83c198f 100644 --- a/ppapi/api/ppb_message_loop.idl +++ b/ppapi/api/ppb_message_loop.idl @@ -37,6 +37,7 @@ label Chrome { * - Call Run() with the message loop resource. * * Your callbacks should look like this: + * @code * void DoMyWork(void* user_data, int32_t status) { * if (status != PP_OK) { * Cleanup(); // e.g. free user_data. @@ -44,6 +45,7 @@ label Chrome { * } * ... 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, diff --git a/ppapi/api/private/ppb_content_decryptor_private.idl b/ppapi/api/private/ppb_content_decryptor_private.idl index e18afef..9a6422d 100644 --- a/ppapi/api/private/ppb_content_decryptor_private.idl +++ b/ppapi/api/private/ppb_content_decryptor_private.idl @@ -33,7 +33,7 @@ interface PPB_ContentDecryptor_Private { * * The browser must notify the application that a key is needed, and, in * response, the web application must direct the browser to call - * <code>AddKey()</code> on the <code>PPP_ContentDecryptor_Private<code> + * <code>AddKey()</code> on the <code>PPP_ContentDecryptor_Private</code> * interface. * * @param[in] key_system A <code>PP_Var</code> of type diff --git a/ppapi/c/pp_completion_callback.h b/ppapi/c/pp_completion_callback.h index 85f19ce..73dc57e 100644 --- a/ppapi/c/pp_completion_callback.h +++ b/ppapi/c/pp_completion_callback.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From pp_completion_callback.idl modified Thu Mar 28 09:51:08 2013. */ +/* From pp_completion_callback.idl modified Thu Mar 28 15:25:03 2013. */ #ifndef PPAPI_C_PP_COMPLETION_CALLBACK_H_ #define PPAPI_C_PP_COMPLETION_CALLBACK_H_ @@ -92,10 +92,10 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_CompletionCallback_Flag, 4); * ways: * - Required: The callback will always be invoked asynchronously on the * thread where the associated PPB method was invoked. The method - * will always return <code>PP_OK_COMPLETIONPENDING</code> when a - * required callback, and the callback will be invoked later - * (barring system or thread shutdown; see PPB_MessageLoop for - * details). Required callbacks are the default. + * will always return PP_OK_COMPLETIONPENDING when a required + * callback, and the callback will be invoked later (barring + * system or thread shutdown; see PPB_MessageLoop for details). + * Required callbacks are the default. * * NOTE: If you use a required callback on a background thread, * you must have created and attached a PPB_MessageLoop. @@ -168,16 +168,16 @@ struct PP_CompletionCallback { * * <strong>Example, creating a Required callback:</strong> * - * <code> + * @code * struct PP_CompletionCallback cc = PP_MakeCompletionCallback(Foo, NULL); - * </code> + * @endcode * * <strong>Example, creating an Optional callback:</strong> * - * <code> + * @code * struct PP_CompletionCallback cc = PP_MakeCompletionCallback(Foo, NULL); * cc.flags = cc.flags | PP_COMPLETIONCALLBACK_FLAG_OPTIONAL; - * </code> + * @endcode * * @param[in] func A <code>PP_CompletionCallback_Func</code> that will be * called. diff --git a/ppapi/c/ppb_graphics_3d.h b/ppapi/c/ppb_graphics_3d.h index 8c409f1..1da70a0 100644 --- a/ppapi/c/ppb_graphics_3d.h +++ b/ppapi/c/ppb_graphics_3d.h @@ -37,25 +37,25 @@ * <strong>Example usage from plugin code:</strong> * * <strong>Setup:</strong> - * <code> + * @code * PP_Resource context; * int32_t attribs[] = {PP_GRAPHICS3DATTRIB_WIDTH, 800, * PP_GRAPHICS3DATTRIB_HEIGHT, 800, * PP_GRAPHICS3DATTRIB_NONE}; * context = g3d->Create(instance, attribs, &context); * inst->BindGraphics(instance, context); - * </code> + * @endcode * * <strong>Present one frame:</strong> - * <code> + * @code * gles2->Clear(context, GL_COLOR_BUFFER); * g3d->SwapBuffers(context); - * </code> + * @endcode * * <strong>Shutdown:</strong> - * <code> + * @code * core->ReleaseResource(context); - * </code> + * @endcode */ struct PPB_Graphics3D_1_0 { /** @@ -176,7 +176,7 @@ struct PPB_Graphics3D_1_0 { * * <strong>Example usage:</strong> To get the values for rgb bits in the * color buffer, this function must be called as following: - * <code> + * @code * int attrib_list[] = {PP_GRAPHICS3DATTRIB_RED_SIZE, 0, * PP_GRAPHICS3DATTRIB_GREEN_SIZE, 0, * PP_GRAPHICS3DATTRIB_BLUE_SIZE, 0, @@ -185,7 +185,7 @@ struct PPB_Graphics3D_1_0 { * int red_bits = attrib_list[1]; * int green_bits = attrib_list[3]; * int blue_bits = attrib_list[5]; - * </code> + * @endcode */ int32_t (*GetAttribs)(PP_Resource context, int32_t attrib_list[]); /** diff --git a/ppapi/c/ppb_input_event.h b/ppapi/c/ppb_input_event.h index 6f612b5..35ef6be 100644 --- a/ppapi/c/ppb_input_event.h +++ b/ppapi/c/ppb_input_event.h @@ -335,11 +335,11 @@ struct PPB_InputEvent_1_0 { * a crack at the message. * * <strong>Example:</strong> - * <code> + * @code * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); * RequestFilteringInputEvents(instance, * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); - * </code> + * @endcode * * @param instance The <code>PP_Instance</code> of the instance requesting * the given events. @@ -376,11 +376,11 @@ struct PPB_InputEvent_1_0 { * can have significant overhead. * * <strong>Example:</strong> - * <code> + * @code * RequestInputEvents(instance, PP_INPUTEVENT_CLASS_MOUSE); * RequestFilteringInputEvents(instance, * PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); - * </code> + * @endcode * * @return <code>PP_OK</code> if the operation succeeded, * <code>PP_ERROR_BADARGUMENT</code> if instance is invalid, or diff --git a/ppapi/c/ppb_message_loop.h b/ppapi/c/ppb_message_loop.h index e9e432e..d582abc 100644 --- a/ppapi/c/ppb_message_loop.h +++ b/ppapi/c/ppb_message_loop.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From ppb_message_loop.idl modified Thu Mar 28 11:08:46 2013. */ +/* From ppb_message_loop.idl modified Mon Apr 1 12:14:25 2013. */ #ifndef PPAPI_C_PPB_MESSAGE_LOOP_H_ #define PPAPI_C_PPB_MESSAGE_LOOP_H_ @@ -55,6 +55,7 @@ * - Call Run() with the message loop resource. * * Your callbacks should look like this: + * @code * void DoMyWork(void* user_data, int32_t status) { * if (status != PP_OK) { * Cleanup(); // e.g. free user_data. @@ -62,6 +63,7 @@ * } * ... 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, diff --git a/ppapi/c/private/ppb_content_decryptor_private.h b/ppapi/c/private/ppb_content_decryptor_private.h index 984c6c1..e42c3c9e 100644 --- a/ppapi/c/private/ppb_content_decryptor_private.h +++ b/ppapi/c/private/ppb_content_decryptor_private.h @@ -4,7 +4,7 @@ */ /* From private/ppb_content_decryptor_private.idl, - * modified Mon Dec 10 21:43:51 2012. + * modified Thu Mar 28 15:22:02 2013. */ #ifndef PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_ @@ -53,7 +53,7 @@ struct PPB_ContentDecryptor_Private_0_6 { * * The browser must notify the application that a key is needed, and, in * response, the web application must direct the browser to call - * <code>AddKey()</code> on the <code>PPP_ContentDecryptor_Private<code> + * <code>AddKey()</code> on the <code>PPP_ContentDecryptor_Private</code> * interface. * * @param[in] key_system A <code>PP_Var</code> of type diff --git a/ppapi/cpp/graphics_3d.h b/ppapi/cpp/graphics_3d.h index bb8706a..31af687 100644 --- a/ppapi/cpp/graphics_3d.h +++ b/ppapi/cpp/graphics_3d.h @@ -109,7 +109,7 @@ class Graphics3D : public Resource { /// /// <strong>Example:</strong> /// - /// <code> + /// @code /// int attrib_list[] = {PP_GRAPHICS3DATTRIB_RED_SIZE, 0, /// PP_GRAPHICS3DATTRIB_GREEN_SIZE, 0, /// PP_GRAPHICS3DATTRIB_BLUE_SIZE, 0, @@ -118,7 +118,7 @@ class Graphics3D : public Resource { /// int red_bits = attrib_list[1]; /// int green_bits = attrib_list[3]; /// int blue_bits = attrib_list[5]; - /// </code> + /// @endcode /// /// This example retrieves the values for rgb bits in the color buffer. int32_t GetAttribs(int32_t attrib_list[]) const; diff --git a/ppapi/cpp/input_event.h b/ppapi/cpp/input_event.h index 42848e2..44de16c 100644 --- a/ppapi/cpp/input_event.h +++ b/ppapi/cpp/input_event.h @@ -29,7 +29,7 @@ class Var; /// appropriate event-specific object to query the properties. /// /// <strong>Example:</strong> -/// <code> +/// @code /// /// bool MyInstance::HandleInputEvent(const pp::InputEvent& event) { /// switch (event.GetType()) { @@ -41,7 +41,7 @@ class Var; /// return false; /// } /// -/// </code> +/// @endcode class InputEvent : public Resource { public: /// Default constructor that creates an is_null() InputEvent object. diff --git a/ppapi/cpp/instance.h b/ppapi/cpp/instance.h index c8f8cab..48bca90 100644 --- a/ppapi/cpp/instance.h +++ b/ppapi/cpp/instance.h @@ -250,7 +250,7 @@ class Instance { /// the instance on which it was invoked, with <code>message</code> being a /// string <code>Var</code> containing "Hello world!" /// - /// <code> + /// @code{.html} /// /// <body> /// <object id="plugin" @@ -260,7 +260,7 @@ class Instance { /// </script> /// </body> /// - /// </code> + /// @endcode /// /// Refer to PostMessage() for sending messages to JavaScript. /// @@ -343,12 +343,12 @@ class Instance { /// /// <strong>Example:</strong> /// - /// <code> + /// @code /// RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE); /// RequestFilteringInputEvents( /// PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); /// - /// </code> + /// @endcode /// /// @param event_classes A combination of flags from /// <code>PP_InputEvent_Class</code> that identifies the classes of events @@ -381,13 +381,13 @@ class Instance { /// /// <strong>Example:</strong> /// - /// <code> + /// @code /// /// RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE); /// RequestFilteringInputEvents( /// PP_INPUTEVENT_CLASS_WHEEL | PP_INPUTEVENT_CLASS_KEYBOARD); /// - /// </code> + /// @endcode /// /// @param event_classes A combination of flags from /// <code>PP_InputEvent_Class</code> that identifies the classes of events @@ -428,7 +428,7 @@ class Instance { /// /// <strong>Example:</strong> /// - /// <code> + /// @code{.html} /// /// <body> /// <object id="plugin" @@ -441,15 +441,15 @@ class Instance { /// </script> /// </body> /// - /// </code> + /// @endcode /// /// The instance then invokes PostMessage() as follows: /// - /// <code> + /// @code /// /// PostMessage(pp::Var("Hello world!")); /// - /// </code> + /// @endcode /// /// The browser will pop-up an alert saying "Hello world!" /// diff --git a/ppapi/cpp/logging.h b/ppapi/cpp/logging.h index 97479a2..d0a4f5b 100644 --- a/ppapi/cpp/logging.h +++ b/ppapi/cpp/logging.h @@ -20,7 +20,7 @@ /// /// <strong>Example:</strong> /// -/// <code> +/// @code /// if (!pointer) { /// // Pointer wasn't valid! This shouldn't happen. /// PP_NOTREACHED(); @@ -28,7 +28,7 @@ /// } /// // Do stuff to the pointer, since you know it's valid. /// pointer->DoSomething(); -/// </code> +/// @endcode #define PP_NOTREACHED() assert(false) #endif // PPAPI_CPP_LOGGING_H_ diff --git a/ppapi/cpp/mouse_lock.h b/ppapi/cpp/mouse_lock.h index c743aed..ed5b07a 100644 --- a/ppapi/cpp/mouse_lock.h +++ b/ppapi/cpp/mouse_lock.h @@ -26,16 +26,16 @@ class Instance; /// composition. /// /// <strong>Example (inheritance):</strong> -/// <code> +/// @code /// class MyInstance : public pp::Instance, public pp::MouseLock { /// class MyInstance() : pp::MouseLock(this) { /// } /// ... /// }; -/// </code> +/// @endcode /// /// <strong>Example (composition):</strong> -/// <code> +/// @code /// class MyMouseLock : public pp::MouseLock { /// ... /// }; @@ -46,7 +46,7 @@ class Instance; /// /// MyMouseLock mouse_lock_; /// }; -/// </code> +/// @endcode class MouseLock { public: /// A constructor for creating a <code>MouseLock</code>. |