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 /* From private/ppp_flash_browser_operations.idl, | 6 /* From private/ppp_flash_browser_operations.idl, |
7 * modified Fri Jun 15 17:00:18 2012. | 7 * modified Wed Jul 25 16:53:17 2012. |
8 */ | 8 */ |
9 | 9 |
10 #ifndef PPAPI_C_PRIVATE_PPP_FLASH_BROWSER_OPERATIONS_H_ | 10 #ifndef PPAPI_C_PRIVATE_PPP_FLASH_BROWSER_OPERATIONS_H_ |
11 #define PPAPI_C_PRIVATE_PPP_FLASH_BROWSER_OPERATIONS_H_ | 11 #define PPAPI_C_PRIVATE_PPP_FLASH_BROWSER_OPERATIONS_H_ |
12 | 12 |
13 #include "ppapi/c/pp_bool.h" | 13 #include "ppapi/c/pp_bool.h" |
14 #include "ppapi/c/pp_macros.h" | 14 #include "ppapi/c/pp_macros.h" |
15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
16 | 16 |
17 #define PPP_FLASH_BROWSEROPERATIONS_INTERFACE_1_0 \ | 17 #define PPP_FLASH_BROWSEROPERATIONS_INTERFACE_1_0 \ |
18 "PPP_Flash_BrowserOperations;1.0" | 18 "PPP_Flash_BrowserOperations;1.0" |
19 #define PPP_FLASH_BROWSEROPERATIONS_INTERFACE_1_2 \ | 19 #define PPP_FLASH_BROWSEROPERATIONS_INTERFACE_1_2 \ |
20 "PPP_Flash_BrowserOperations;1.2" | 20 "PPP_Flash_BrowserOperations;1.2" |
| 21 #define PPP_FLASH_BROWSEROPERATIONS_INTERFACE_1_3 \ |
| 22 "PPP_Flash_BrowserOperations;1.3" |
21 #define PPP_FLASH_BROWSEROPERATIONS_INTERFACE \ | 23 #define PPP_FLASH_BROWSEROPERATIONS_INTERFACE \ |
22 PPP_FLASH_BROWSEROPERATIONS_INTERFACE_1_2 | 24 PPP_FLASH_BROWSEROPERATIONS_INTERFACE_1_3 |
23 | 25 |
24 /** | 26 /** |
25 * @file | 27 * @file |
26 * This file contains the <code>PPP_Flash_BrowserOperations</code> interface. | 28 * This file contains the <code>PPP_Flash_BrowserOperations</code> interface. |
27 */ | 29 */ |
28 | 30 |
29 | 31 |
30 /** | 32 /** |
31 * @addtogroup Enums | 33 * @addtogroup Enums |
32 * @{ | 34 * @{ |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 * @} | 77 * @} |
76 */ | 78 */ |
77 | 79 |
78 /** | 80 /** |
79 * @addtogroup Interfaces | 81 * @addtogroup Interfaces |
80 * @{ | 82 * @{ |
81 */ | 83 */ |
82 /** | 84 /** |
83 * This interface allows the browser to request the plugin do things. | 85 * This interface allows the browser to request the plugin do things. |
84 */ | 86 */ |
85 struct PPP_Flash_BrowserOperations_1_2 { | 87 struct PPP_Flash_BrowserOperations_1_3 { |
86 /** | 88 /** |
87 * This function allows the plugin to implement the "Clear site data" feature. | 89 * This function allows the plugin to implement the "Clear site data" feature. |
88 * | 90 * |
89 * @plugin_data_path String containing the directory where the plugin data is | 91 * @param[in] plugin_data_path String containing the directory where the |
| 92 * plugin data is |
90 * stored. On UTF16 systems (Windows), this will be encoded as UTF-8. It will | 93 * stored. On UTF16 systems (Windows), this will be encoded as UTF-8. It will |
91 * be an absolute path and will not have a directory separator (slash) at the | 94 * be an absolute path and will not have a directory separator (slash) at the |
92 * end. | 95 * end. |
93 * | 96 * @param[in] site String specifying which site to clear the data for. This |
94 * @arg site String specifying which site to clear the data for. This will | 97 * will be null to clear data for all sites. |
95 * be null to clear data for all sites. | 98 * @param[in] flags Currently always 0 in Chrome to clear all data. This may |
96 * | 99 * be extended in the future to clear only specific types of data. |
97 * @arg flags Currently always 0 in Chrome to clear all data. This may be | 100 * @param[in] max_age The maximum age in seconds to clear data for. This |
98 * extended in the future to clear only specific types of data. | 101 * allows the plugin to implement "clear past hour" and "clear past data", |
99 * | 102 * etc. |
100 * @arg max_age The maximum age in seconds to clear data for. This allows the | |
101 * plugin to implement "clear past hour" and "clear past data", etc. | |
102 * | 103 * |
103 * @return PP_TRUE on success, PP_FALSE on failure. | 104 * @return PP_TRUE on success, PP_FALSE on failure. |
104 * | 105 * |
105 * See also the NPP_ClearSiteData function in NPAPI. | 106 * See also the NPP_ClearSiteData function in NPAPI. |
106 * https://wiki.mozilla.org/NPAPI:ClearSiteData | 107 * https://wiki.mozilla.org/NPAPI:ClearSiteData |
107 */ | 108 */ |
108 PP_Bool (*ClearSiteData)(const char* plugin_data_path, | 109 PP_Bool (*ClearSiteData)(const char* plugin_data_path, |
109 const char* site, | 110 const char* site, |
110 uint64_t flags, | 111 uint64_t flags, |
111 uint64_t max_age); | 112 uint64_t max_age); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 * <code>PP_FLASH_BROWSEROPERATIONS_PERMISSION_DEFAULT</code> permission, it | 167 * <code>PP_FLASH_BROWSEROPERATIONS_PERMISSION_DEFAULT</code> permission, it |
167 * will be removed from the site-specific list. | 168 * will be removed from the site-specific list. |
168 * | 169 * |
169 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure. | 170 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure. |
170 */ | 171 */ |
171 PP_Bool (*SetSitePermission)( | 172 PP_Bool (*SetSitePermission)( |
172 const char* plugin_data_path, | 173 const char* plugin_data_path, |
173 PP_Flash_BrowserOperations_SettingType setting_type, | 174 PP_Flash_BrowserOperations_SettingType setting_type, |
174 uint32_t site_count, | 175 uint32_t site_count, |
175 const struct PP_Flash_BrowserOperations_SiteSetting sites[]); | 176 const struct PP_Flash_BrowserOperations_SiteSetting sites[]); |
| 177 /** |
| 178 * Returns a list of sites that have stored data, for use with the |
| 179 * "Clear site data" feature. |
| 180 * |
| 181 * @param[in] plugin_data_path String containing the directory where the |
| 182 * plugin data is stored. |
| 183 * @param[out] sites A NULL-terminated array of sites that have stored data. |
| 184 * Use FreeSiteList on the the array when done. |
| 185 * |
| 186 * See also the NPP_GetSitesWithData function in NPAPI: |
| 187 * https://wiki.mozilla.org/NPAPI:ClearSiteData |
| 188 */ |
| 189 void (*GetSitesWithData)(const char* plugin_data_path, char** sites[]); |
| 190 /** |
| 191 * Frees the list of sites returned by GetSitesWithData. |
| 192 * |
| 193 * @param[in] sites A NULL-terminated array of strings. |
| 194 */ |
| 195 void (*FreeSiteList)(char* sites[]); |
176 }; | 196 }; |
177 | 197 |
178 typedef struct PPP_Flash_BrowserOperations_1_2 PPP_Flash_BrowserOperations; | 198 typedef struct PPP_Flash_BrowserOperations_1_3 PPP_Flash_BrowserOperations; |
179 | 199 |
180 struct PPP_Flash_BrowserOperations_1_0 { | 200 struct PPP_Flash_BrowserOperations_1_0 { |
181 PP_Bool (*ClearSiteData)(const char* plugin_data_path, | 201 PP_Bool (*ClearSiteData)(const char* plugin_data_path, |
182 const char* site, | 202 const char* site, |
183 uint64_t flags, | 203 uint64_t flags, |
184 uint64_t max_age); | 204 uint64_t max_age); |
185 }; | 205 }; |
| 206 |
| 207 struct PPP_Flash_BrowserOperations_1_2 { |
| 208 PP_Bool (*ClearSiteData)(const char* plugin_data_path, |
| 209 const char* site, |
| 210 uint64_t flags, |
| 211 uint64_t max_age); |
| 212 PP_Bool (*DeauthorizeContentLicenses)(const char* plugin_data_path); |
| 213 void (*GetPermissionSettings)( |
| 214 const char* plugin_data_path, |
| 215 PP_Flash_BrowserOperations_SettingType setting_type, |
| 216 PPB_Flash_BrowserOperations_GetSettingsCallback callback, |
| 217 void* user_data); |
| 218 PP_Bool (*SetDefaultPermission)( |
| 219 const char* plugin_data_path, |
| 220 PP_Flash_BrowserOperations_SettingType setting_type, |
| 221 PP_Flash_BrowserOperations_Permission permission, |
| 222 PP_Bool clear_site_specific); |
| 223 PP_Bool (*SetSitePermission)( |
| 224 const char* plugin_data_path, |
| 225 PP_Flash_BrowserOperations_SettingType setting_type, |
| 226 uint32_t site_count, |
| 227 const struct PP_Flash_BrowserOperations_SiteSetting sites[]); |
| 228 }; |
186 /** | 229 /** |
187 * @} | 230 * @} |
188 */ | 231 */ |
189 | 232 |
190 #endif /* PPAPI_C_PRIVATE_PPP_FLASH_BROWSER_OPERATIONS_H_ */ | 233 #endif /* PPAPI_C_PRIVATE_PPP_FLASH_BROWSER_OPERATIONS_H_ */ |
191 | 234 |
OLD | NEW |