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 contains the <code>PPP_Flash_BrowserOperations</code> interface. | 7 * This file contains the <code>PPP_Flash_BrowserOperations</code> interface. |
8 */ | 8 */ |
9 | 9 |
10 label Chrome { | 10 label Chrome { |
11 M20 = 1.0, | 11 M20 = 1.0, |
12 M21 = 1.2 | 12 M21 = 1.2, |
| 13 M22 = 1.3 |
13 }; | 14 }; |
14 | 15 |
15 [assert_size(4)] | 16 [assert_size(4)] |
16 enum PP_Flash_BrowserOperations_SettingType { | 17 enum PP_Flash_BrowserOperations_SettingType { |
17 PP_FLASH_BROWSEROPERATIONS_SETTINGTYPE_CAMERAMIC = 0, | 18 PP_FLASH_BROWSEROPERATIONS_SETTINGTYPE_CAMERAMIC = 0, |
18 PP_FLASH_BROWSEROPERATIONS_SETTINGTYPE_PEERNETWORKING = 1 | 19 PP_FLASH_BROWSEROPERATIONS_SETTINGTYPE_PEERNETWORKING = 1 |
19 }; | 20 }; |
20 | 21 |
21 [assert_size(4)] | 22 [assert_size(4)] |
22 enum PP_Flash_BrowserOperations_Permission { | 23 enum PP_Flash_BrowserOperations_Permission { |
(...skipping 16 matching lines...) Expand all Loading... |
39 [in] uint32_t site_count, | 40 [in] uint32_t site_count, |
40 [in, size_is(site_count)] PP_Flash_BrowserOperations_SiteSetting[] sites); | 41 [in, size_is(site_count)] PP_Flash_BrowserOperations_SiteSetting[] sites); |
41 | 42 |
42 /** | 43 /** |
43 * This interface allows the browser to request the plugin do things. | 44 * This interface allows the browser to request the plugin do things. |
44 */ | 45 */ |
45 interface PPP_Flash_BrowserOperations { | 46 interface PPP_Flash_BrowserOperations { |
46 /** | 47 /** |
47 * This function allows the plugin to implement the "Clear site data" feature. | 48 * This function allows the plugin to implement the "Clear site data" feature. |
48 * | 49 * |
49 * @plugin_data_path String containing the directory where the plugin data is | 50 * @param[in] plugin_data_path String containing the directory where the |
| 51 * plugin data is |
50 * stored. On UTF16 systems (Windows), this will be encoded as UTF-8. It will | 52 * stored. On UTF16 systems (Windows), this will be encoded as UTF-8. It will |
51 * be an absolute path and will not have a directory separator (slash) at the | 53 * be an absolute path and will not have a directory separator (slash) at the |
52 * end. | 54 * end. |
53 * | 55 * @param[in] site String specifying which site to clear the data for. This |
54 * @arg site String specifying which site to clear the data for. This will | 56 * will be null to clear data for all sites. |
55 * be null to clear data for all sites. | 57 * @param[in] flags Currently always 0 in Chrome to clear all data. This may |
56 * | 58 * be extended in the future to clear only specific types of data. |
57 * @arg flags Currently always 0 in Chrome to clear all data. This may be | 59 * @param[in] max_age The maximum age in seconds to clear data for. This |
58 * extended in the future to clear only specific types of data. | 60 * allows the plugin to implement "clear past hour" and "clear past data", |
59 * | 61 * etc. |
60 * @arg max_age The maximum age in seconds to clear data for. This allows the | |
61 * plugin to implement "clear past hour" and "clear past data", etc. | |
62 * | 62 * |
63 * @return PP_TRUE on success, PP_FALSE on failure. | 63 * @return PP_TRUE on success, PP_FALSE on failure. |
64 * | 64 * |
65 * See also the NPP_ClearSiteData function in NPAPI. | 65 * See also the NPP_ClearSiteData function in NPAPI. |
66 * https://wiki.mozilla.org/NPAPI:ClearSiteData | 66 * https://wiki.mozilla.org/NPAPI:ClearSiteData |
67 */ | 67 */ |
68 PP_Bool ClearSiteData(str_t plugin_data_path, | 68 PP_Bool ClearSiteData([in] str_t plugin_data_path, |
69 str_t site, | 69 [in] str_t site, |
70 uint64_t flags, | 70 [in] uint64_t flags, |
71 uint64_t max_age); | 71 [in] uint64_t max_age); |
72 | 72 |
73 /** | 73 /** |
74 * Requests the plugin to deauthorize content licenses. It prevents Flash from | 74 * Requests the plugin to deauthorize content licenses. It prevents Flash from |
75 * playing protected content, such as movies and music the user may have | 75 * playing protected content, such as movies and music the user may have |
76 * rented or purchased. | 76 * rented or purchased. |
77 * | 77 * |
78 * @param[in] plugin_data_path String containing the directory where the | 78 * @param[in] plugin_data_path String containing the directory where the |
79 * plugin settings are stored. | 79 * plugin settings are stored. |
80 * | 80 * |
81 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure. | 81 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 * will be removed from the site-specific list. | 134 * will be removed from the site-specific list. |
135 * | 135 * |
136 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure. | 136 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure. |
137 */ | 137 */ |
138 [version=1.2] | 138 [version=1.2] |
139 PP_Bool SetSitePermission( | 139 PP_Bool SetSitePermission( |
140 [in] str_t plugin_data_path, | 140 [in] str_t plugin_data_path, |
141 [in] PP_Flash_BrowserOperations_SettingType setting_type, | 141 [in] PP_Flash_BrowserOperations_SettingType setting_type, |
142 [in] uint32_t site_count, | 142 [in] uint32_t site_count, |
143 [in, size_is(site_count)] PP_Flash_BrowserOperations_SiteSetting[] sites); | 143 [in, size_is(site_count)] PP_Flash_BrowserOperations_SiteSetting[] sites); |
| 144 |
| 145 /** |
| 146 * Returns a list of sites that have stored data, for use with the |
| 147 * "Clear site data" feature. |
| 148 * |
| 149 * @param[in] plugin_data_path String containing the directory where the |
| 150 * plugin data is stored. |
| 151 * @param[out] sites A NULL-terminated array of sites that have stored data. |
| 152 * Use FreeSiteList on the the array when done. |
| 153 * |
| 154 * See also the NPP_GetSitesWithData function in NPAPI: |
| 155 * https://wiki.mozilla.org/NPAPI:ClearSiteData |
| 156 */ |
| 157 [version=1.3] |
| 158 void GetSitesWithData([in] str_t plugin_data_path, |
| 159 [out] str_t[] sites); |
| 160 |
| 161 /** |
| 162 * Frees the list of sites returned by GetSitesWithData. |
| 163 * |
| 164 * @param[in] sites A NULL-terminated array of strings. |
| 165 */ |
| 166 [version=1.3] |
| 167 void FreeSiteList([inout] str_t[] sites); |
144 }; | 168 }; |
OLD | NEW |