| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 #ifndef PPAPI_C_PPB_BROKER_TRUSTED_H_ | |
| 6 #define PPAPI_C_PPB_BROKER_TRUSTED_H_ | |
| 7 | 5 |
| 6 /* From trusted/ppb_broker_trusted.idl modified Mon Jul 11 15:02:48 2011. */ |
| 7 |
| 8 #ifndef PPAPI_C_TRUSTED_PPB_BROKER_TRUSTED_H_ |
| 9 #define PPAPI_C_TRUSTED_PPB_BROKER_TRUSTED_H_ |
| 10 |
| 11 #include "ppapi/c/pp_bool.h" |
| 8 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
| 9 #include "ppapi/c/pp_bool.h" | |
| 10 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
| 14 #include "ppapi/c/pp_macros.h" |
| 11 #include "ppapi/c/pp_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
| 12 | 16 #include "ppapi/c/pp_stdint.h" |
| 13 #define PPB_BROKER_TRUSTED_INTERFACE "PPB_BrokerTrusted;0.2" | |
| 14 | 17 |
| 15 /** | 18 /** |
| 16 * @file | 19 * @file |
| 17 * This file defines the PPB_BrokerTrusted interface, which provides | 20 * This file defines the PPB_BrokerTrusted interface, which provides |
| 18 * access to a trusted broker with greater privileges than the plugin. | 21 * access to a trusted broker with greater privileges than the plugin. |
| 19 */ | 22 */ |
| 20 | 23 |
| 24 |
| 21 /** | 25 /** |
| 22 * @addtogroup Interfaces | 26 * @addtogroup Interfaces |
| 23 * @{ | 27 * @{ |
| 24 */ | 28 */ |
| 25 | |
| 26 /** | 29 /** |
| 27 * The PPB_BrokerTrusted interface provides access to a trusted broker | 30 * The PPB_BrokerTrusted interface provides access to a trusted broker |
| 28 * with greater privileges than the plugin. The interface only supports | 31 * with greater privileges than the plugin. The interface only supports |
| 29 * out-of-process plugins and is to be used by proxy implementations. All | 32 * out-of-process plugins and is to be used by proxy implementations. All |
| 30 * functions should be called from the main thread only. | 33 * functions should be called from the main thread only. |
| 31 * | 34 * |
| 32 * A PPB_BrokerTrusted resource represents a connection to the broker. Its | 35 * A PPB_BrokerTrusted resource represents a connection to the broker. Its |
| 33 * lifetime controls the lifetime of the broker, regardless of whether the | 36 * lifetime controls the lifetime of the broker, regardless of whether the |
| 34 * handle is closed. The handle should be closed before the resource is | 37 * handle is closed. The handle should be closed before the resource is |
| 35 * released. | 38 * released. |
| 36 */ | 39 */ |
| 40 #define PPB_BROKERTRUSTED_INTERFACE_0_2 "PPB_BrokerTrusted;0.2" |
| 41 #define PPB_BROKERTRUSTED_INTERFACE PPB_BROKERTRUSTED_INTERFACE_0_2 |
| 42 |
| 37 struct PPB_BrokerTrusted { | 43 struct PPB_BrokerTrusted { |
| 38 /** | 44 /** |
| 39 * Returns a trusted broker resource. | 45 * Returns a trusted broker resource. |
| 40 */ | 46 */ |
| 41 PP_Resource (*CreateTrusted)(PP_Instance instance); | 47 PP_Resource (*CreateTrusted)(PP_Instance instance); |
| 42 | 48 |
| 43 /** | 49 /** |
| 44 * Returns true if the resource is a trusted broker. | 50 * Returns true if the resource is a trusted broker. |
| 45 */ | 51 */ |
| 46 PP_Bool (*IsBrokerTrusted)(PP_Resource resource); | 52 PP_Bool (*IsBrokerTrusted)(PP_Resource resource); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 64 | 70 |
| 65 /** | 71 /** |
| 66 * Gets the handle to the pipe. Use once Connect has completed. Each instance | 72 * Gets the handle to the pipe. Use once Connect has completed. Each instance |
| 67 * of this interface has its own pipe. | 73 * of this interface has its own pipe. |
| 68 * | 74 * |
| 69 * Returns PP_OK on success, and places the result into the given output | 75 * Returns PP_OK on success, and places the result into the given output |
| 70 * parameter. The handle is only set when returning PP_OK. Calling this | 76 * parameter. The handle is only set when returning PP_OK. Calling this |
| 71 * before connect has completed will return PP_ERROR_FAILED. | 77 * before connect has completed will return PP_ERROR_FAILED. |
| 72 */ | 78 */ |
| 73 int32_t (*GetHandle)(PP_Resource broker, int32_t* handle); | 79 int32_t (*GetHandle)(PP_Resource broker, int32_t* handle); |
| 80 |
| 74 }; | 81 }; |
| 82 |
| 75 /** | 83 /** |
| 76 * @} | 84 * @} |
| 77 */ | 85 */ |
| 78 | 86 |
| 79 #endif /* PPAPI_C_PPB_BROKER_TRUSTED_H_ */ | 87 #endif /* PPAPI_C_TRUSTED_PPB_BROKER_TRUSTED_H_ */ |
| 88 |
| OLD | NEW |