| 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 | 5 |
| 6 /** | 6 /** |
| 7 * This file defines the <code>PPB_NetworkMonitor_Private</code> interface. | 7 * This file defines the <code>PPB_NetworkMonitor</code> interface. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 [generate_thunk] | 10 [generate_thunk] |
| 11 | 11 |
| 12 label Chrome { | 12 label Chrome { |
| 13 M31 = 0.3 | 13 M31 = 1.0 |
| 14 }; | 14 }; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * The <code>PPB_NetworkMonitor_Private</code> provides access to | 17 * The <code>PPB_NetworkMonitor</code> allows to get network interfaces |
| 18 * notifications of network configuration changes. | 18 * configuration and monitor network configuration changes. |
| 19 * |
| 20 * Permissions: Apps permission <code>socket</code> with subrule |
| 21 * <code>network-state</code> is required for <code>UpdateNetworkList()</code>. |
| 22 * For more details about network communication permissions, please see: |
| 23 * http://developer.chrome.com/apps/app_network.html |
| 19 */ | 24 */ |
| 20 interface PPB_NetworkMonitor_Private { | 25 interface PPB_NetworkMonitor { |
| 21 /** | 26 /** |
| 22 * Creates a Network Monitor resource. | 27 * Creates a Network Monitor resource. |
| 23 * | 28 * |
| 24 * @param[in] instance A <code>PP_Instance</code> identifying one instance of | 29 * @param[in] instance A <code>PP_Instance</code> identifying one instance of |
| 25 * a module. | 30 * a module. |
| 26 * | 31 * |
| 27 * @return A <code>PP_Resource</code> corresponding to a network monitor or 0 | 32 * @return A <code>PP_Resource</code> corresponding to a network monitor or 0 |
| 28 * on failure. | 33 * on failure. |
| 29 */ | 34 */ |
| 30 PP_Resource Create([in] PP_Instance instance); | 35 PP_Resource Create([in] PP_Instance instance); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 50 int32_t UpdateNetworkList([in] PP_Resource network_monitor, | 55 int32_t UpdateNetworkList([in] PP_Resource network_monitor, |
| 51 [out] PP_Resource network_list, | 56 [out] PP_Resource network_list, |
| 52 [in] PP_CompletionCallback callback); | 57 [in] PP_CompletionCallback callback); |
| 53 | 58 |
| 54 /** | 59 /** |
| 55 * Determines if the specified <code>resource</code> is a | 60 * Determines if the specified <code>resource</code> is a |
| 56 * <code>NetworkMonitor</code> object. | 61 * <code>NetworkMonitor</code> object. |
| 57 * | 62 * |
| 58 * @param[in] resource A <code>PP_Resource</code> resource. | 63 * @param[in] resource A <code>PP_Resource</code> resource. |
| 59 * | 64 * |
| 60 * @return Returns <code>PP_TRUE</code> if <code>resource</code> is | 65 * @return Returns <code>PP_TRUE</code> if <code>resource</code> is a |
| 61 * a <code>PPB_NetworkMonitor_Private</code>, <code>PP_FALSE</code> | 66 * <code>PPB_NetworkMonitor</code>, <code>PP_FALSE</code> otherwise. |
| 62 * otherwise. | |
| 63 */ | 67 */ |
| 64 PP_Bool IsNetworkMonitor([in] PP_Resource resource); | 68 PP_Bool IsNetworkMonitor([in] PP_Resource resource); |
| 65 }; | 69 }; |
| OLD | NEW |