Chromium Code Reviews| Index: ppapi/api/private/ppb_network_monitor_private.idl |
| diff --git a/ppapi/api/private/ppb_network_monitor_private.idl b/ppapi/api/private/ppb_network_monitor_private.idl |
| index fe264a616bc16326f969518501f358709646b2d1..13a6d8725dfec979b2d6a1ea3a63fabc97516007 100644 |
| --- a/ppapi/api/private/ppb_network_monitor_private.idl |
| +++ b/ppapi/api/private/ppb_network_monitor_private.idl |
| @@ -8,47 +8,46 @@ |
| */ |
| label Chrome { |
| - M19 = 0.2 |
| + M31 = 0.3 |
| }; |
| /** |
| - * <code>PPB_NetworkMonitor_Callback</code> is a callback function |
| - * type that is used to receive notifications about network |
| - * configuration changes. The <code>network_list</code> passed to this |
| - * callback is a <code>PPB_NetworkList_Private</code> resource that |
| - * contains current configuration of network interfaces. |
| - */ |
| -typedef void PPB_NetworkMonitor_Callback([inout] mem_t user_data, |
| - [in] PP_Resource network_list); |
| - |
| - |
| -/** |
| * The <code>PPB_NetworkMonitor_Private</code> provides access to |
| * notifications of network configuration changes. |
| */ |
| interface PPB_NetworkMonitor_Private { |
| /** |
| - * Starts network change monitoring. The specified |
| - * <code>callback</code> will be called on the main thread once |
| - * after this method is called (to supply the initial network |
| - * configuration) and then later every time network configuration |
| - * changes. Notifications are stopped when the returned resource is |
| - * destroyed. If the plugin doesn't have access to the network list |
| - * then the callback will be called once with the |
| - * <code>network_list</code> parameter is set to 0. |
| + * Creates a Network Monitor resource. |
| + * |
| + * @param[in] instance A <code>PP_Instance</code> identifying one instance of |
| + * a module. |
| * |
| - * @param[in] callback The callback that will be called every time |
| - * network configuration changes or NULL to stop network monitoring. |
| + * @return A <code>PP_Resource</code> corresponding to a network monitor or 0 |
| + * on failure. |
| + */ |
| + PP_Resource Create([in] PP_Instance instance); |
| + |
| + |
| + /** |
| + * Gets current network configuration. When called for the first time, completes as |
|
yzshen1
2013/09/04 19:52:01
- longer than 80 chars
Sergey Ulanov
2013/09/04 22:22:32
Done.
|
| + * soon as the current network configuration is received from the browser. |
| + * Each consequent call will wait for network list changes, returning a new |
| + * <code>PPB_NetworkList</code> resource every time. |
| * |
| - * @param[inout] user_data The data to be passed to the callback on |
| - * each call. |
| + * @param[in] network_monitor A <code>PP_Resource</code> corresponding to a |
| + * network monitor. |
| + * @param[out] network_list The <code>PPB_NetworkList<code> resource with the |
| + * current state of network interfaces. |
| + * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| + * completion. |
| * |
| - * @return A <code>PP_Resource</code> containing the created |
| - * NetworkMonitor resource. |
| + * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| + * <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have |
| + * required permissions. |
| */ |
| - PP_Resource Create([in] PP_Instance instance, |
| - [in] PPB_NetworkMonitor_Callback callback, |
| - [inout] mem_t user_data); |
| + int32_t UpdateNetworkList([in] PP_Resource network_monitor, |
| + [out] PP_Resource network_list, |
| + [in] PP_CompletionCallback callback); |
| /** |
| * Determines if the specified <code>resource</code> is a |