diff options
author | jond@google.com <jond@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-06 15:37:28 +0000 |
---|---|---|
committer | jond@google.com <jond@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-06 15:37:28 +0000 |
commit | 8dd1f5778b67cec32b169e0a7e6558c9ca19c75c (patch) | |
tree | 2a758829f62afc4ad94d2fb3f6006c820e3a5d87 /ppapi/c/ppb_core.h | |
parent | b00a46023e5ca59e7ec7d4cee84fb1aaf416f0e8 (diff) | |
download | chromium_src-8dd1f5778b67cec32b169e0a7e6558c9ca19c75c.zip chromium_src-8dd1f5778b67cec32b169e0a7e6558c9ca19c75c.tar.gz chromium_src-8dd1f5778b67cec32b169e0a7e6558c9ca19c75c.tar.bz2 |
Misc. changes. Mostly formatting.
Review URL: http://codereview.chromium.org/7282015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c/ppb_core.h')
-rw-r--r-- | ppapi/c/ppb_core.h | 93 |
1 files changed, 46 insertions, 47 deletions
diff --git a/ppapi/c/ppb_core.h b/ppapi/c/ppb_core.h index 968dfcd..e409d48 100644 --- a/ppapi/c/ppb_core.h +++ b/ppapi/c/ppb_core.h @@ -18,9 +18,9 @@ struct PP_CompletionCallback; /** * @file - * This file defines the PPB_Core interface defined by the browser and - * and containing pointers to functions related to memory management, - * time, and threads. + * This file defines the <code>PPB_Core</code> interface defined by the browser + * and containing pointers to functions related to memory management, time, and + * threads. */ /** @@ -29,65 +29,63 @@ struct PP_CompletionCallback; */ /** - * The PPB_Core interface contains pointers to functions related to memory - * management, time, and threads on the browser. + * The <code>PPB_Core</code> interface contains pointers to functions related + * to memory management, time, and threads on the browser. * */ struct PPB_Core { /** - * Same as AddRefVar for Resources. - * AddRefResource is a pointer to a function that adds a reference to - * a resource. * - * @param[in] config A PP_Resource containing the resource. + * AddRefResource() adds a reference to a resource. + * + * @param[in] config A <code>PP_Resource</code> containing the resource. */ void (*AddRefResource)(PP_Resource resource); /** - * ReleaseResource is a pointer to a function that removes a reference - * from a resource. + * ReleaseResource() removes a reference from a resource. * - * @param[in] config A PP_Resource containing the resource. + * @param[in] config A <code>PP_Resource</code> containing the resource. */ -/*Same as ReleaseVar for Resources. */ void (*ReleaseResource)(PP_Resource resource); /** - * MemAlloc is a pointer to a function that allocate memory. + * MemAlloc() allocates memory. * * @param[in] num_bytes A number of bytes to allocate. - * @return A pointer to the memory if successful, NULL If the + * + * @return A pointer to the memory if successful, <code>NULL</code> If the * allocation fails. */ void* (*MemAlloc)(uint32_t num_bytes); /** - * MemFree is a pointer to a function that deallocates memory. + * <code>MemFree()</code> deallocates memory. * * @param[in] ptr A pointer to the memory to deallocate. It is safe to - * pass NULL to this function. + * pass <code>NULL</code> to this function. */ void (*MemFree)(void* ptr); /** - * GetTime is a pointer to a function that returns the "wall clock - * time" according to the browser. - * - * @return A PP_Time containing the "wall clock time" according to the + * GetTime() returns the "wall clock time" according to the * browser. + * + * @return A <code>PP_Time</code> containing the "wall clock time" according + * to the browser. */ PP_Time (*GetTime)(); /** - * GetTimeTicks is a pointer to a function that returns the "tick time" - * according to the browser. This clock is used by the browser when passing - * some event times to the plugin (e.g., via the - * PP_InputEvent::time_stamp_seconds field). It is not correlated to any - * actual wall clock time (like GetTime()). Because of this, it will not run - * change if the user changes their computer clock. + * GetTimeTicks() returns the "tick time" according to the browser. + * This clock is used by the browser when passing some event times to the + * module (e.g. using the <code>PP_InputEvent::time_stamp_seconds</code> + * field). It is not correlated to any actual wall clock time + * (like GetTime()). Because of this, it will not run change if the user + * changes their computer clock. * - * @return A PP_TimeTicks containing the "tick time" according to the - * browser. + * @return A <code>PP_TimeTicks</code> containing the "tick time" according + * to the browser. */ // TODO(brettw) http://code.google.com/p/chromium/issues/detail?id=57448 @@ -96,40 +94,41 @@ struct PPB_Core { PP_TimeTicks (*GetTimeTicks)(); /** - * CallOnMainThread is a pointer to a function that schedules work to be - * executed on the main module thread after the specified delay. The delay - * may be 0 to specify a call back as soon as possible. + * CallOnMainThread() schedules work to be executed on the main module thread + * after the specified delay. The delay may be 0 to specify a call back as + * soon as possible. * - * The |result| parameter will just be passed as the second argument to the - * callback. Many applications won't need this, but it allows a plugin to - * emulate calls of some callbacks which do use this value. + * The <code>result</code> parameter will just be passed as the second + * argument to the callback. Many applications won't need this, but it allows + * a module to emulate calls of some callbacks which do use this value. * - * NOTE: CallOnMainThread, even when used from the main thread with a delay - * of 0 milliseconds, will never directly invoke the callback. Even in this - * case, the callback will be scheduled asynchronously. + * <strong>Note:</strong> CallOnMainThread, even when used from the main + * thread with a delay of 0 milliseconds, will never directly invoke the + * callback. Even in this case, the callback will be scheduled + * asynchronously. * - * NOTE: If the browser is shutting down or if the plugin has no instances, - * then the callback function may not be called. + * <strong>Note:</strong> If the browser is shutting down or if the module + * has no instances, then the callback function may not be called. * * @param[in] delay_in_milliseconds An int32_t delay in milliseconds. - * @param[in] callback A PP_CompletionCallback callback function that the - * browser will call after the specified delay. + * @param[in] callback A <code>PP_CompletionCallback</code> callback function + * that the browser will call after the specified delay. * @param[in] result An int32_t that the browser will pass to the given - * PP_CompletionCallback. + * <code>PP_CompletionCallback</code>. */ void (*CallOnMainThread)(int32_t delay_in_milliseconds, struct PP_CompletionCallback callback, int32_t result); /** - * IsMainThread is a pointer to a function that returns true if the - * current thread is the main pepper thread. + * IsMainThread() returns true if the current thread is the main pepper + * thread. * * This function is useful for implementing sanity checks, and deciding if * dispatching using CallOnMainThread() is required. * - * @return A PP_BOOL containing PP_TRUE if the current thread is the main - * pepper thread, otherwise PP_FALSE. + * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the + * current thread is the main pepper thread, otherwise <code>PP_FALSE</code>. */ PP_Bool (*IsMainThread)(); }; |