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 14 matching lines...) Expand all Loading... | |
37 [in] PP_Bool success, | 38 [in] PP_Bool success, |
38 [in] PP_Flash_BrowserOperations_Permission default_permission, | 39 [in] PP_Flash_BrowserOperations_Permission default_permission, |
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 /** |
48 * Returns a list of sites that have stored data, for use with the | |
brettw
2012/07/25 23:17:03
Can you put these new versions at the bottom?
I t
Bernhard Bauer
2012/07/26 00:18:53
Done.
| |
49 * "Clear site data" feature. | |
50 * | |
51 * @param[in] plugin_data_path String containing the directory where the | |
52 * plugin data is stored. | |
53 * @param[out] sites A NULL-terminated array of sites that have stored data. | |
54 * Use FreeSiteList on the the array when done. | |
55 * | |
56 * See also the NPP_GetSitesWithData function in NPAPI: | |
57 * https://wiki.mozilla.org/NPAPI:ClearSiteData | |
58 */ | |
59 [version=1.3] | |
60 void GetSitesWithData([in] str_t plugin_data_path, | |
61 [out] str_t[] sites); | |
brettw
2012/07/25 23:17:03
We need to define how the memory management works
yzshen1
2012/07/25 23:56:24
We couldn't use PP_Var in this interface, because
Bernhard Bauer
2012/07/26 00:18:53
The caller passes in the list of sites to FreeSite
| |
62 | |
63 /** | |
64 * Frees the list of sites returned by GetSitesWithData. | |
65 * | |
66 * @param[in] sites A NULL-terminated array of strings. | |
67 */ | |
68 [version=1.3] | |
69 void FreeSiteList([inout] str_t[] sites); | |
brettw
2012/07/25 23:17:03
Ditto with the return value instead of out param.
| |
70 | |
71 /** | |
47 * This function allows the plugin to implement the "Clear site data" feature. | 72 * This function allows the plugin to implement the "Clear site data" feature. |
48 * | 73 * |
49 * @plugin_data_path String containing the directory where the plugin data is | 74 * @param[in] plugin_data_path String containing the directory where the |
75 * plugin data is | |
50 * stored. On UTF16 systems (Windows), this will be encoded as UTF-8. It will | 76 * 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 | 77 * be an absolute path and will not have a directory separator (slash) at the |
52 * end. | 78 * end. |
53 * | 79 * @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 | 80 * will be null to clear data for all sites. |
55 * be null to clear data for all sites. | 81 * @param[in] flags Currently always 0 in Chrome to clear all data. This may |
56 * | 82 * 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 | 83 * @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. | 84 * allows the plugin to implement "clear past hour" and "clear past data", |
59 * | 85 * 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 * | 86 * |
63 * @return PP_TRUE on success, PP_FALSE on failure. | 87 * @return PP_TRUE on success, PP_FALSE on failure. |
64 * | 88 * |
65 * See also the NPP_ClearSiteData function in NPAPI. | 89 * See also the NPP_ClearSiteData function in NPAPI. |
66 * https://wiki.mozilla.org/NPAPI:ClearSiteData | 90 * https://wiki.mozilla.org/NPAPI:ClearSiteData |
67 */ | 91 */ |
68 PP_Bool ClearSiteData(str_t plugin_data_path, | 92 PP_Bool ClearSiteData([in] str_t plugin_data_path, |
69 str_t site, | 93 [in] str_t site, |
70 uint64_t flags, | 94 [in] uint64_t flags, |
71 uint64_t max_age); | 95 [in] uint64_t max_age); |
72 | 96 |
73 /** | 97 /** |
74 * Requests the plugin to deauthorize content licenses. It prevents Flash from | 98 * Requests the plugin to deauthorize content licenses. It prevents Flash from |
75 * playing protected content, such as movies and music the user may have | 99 * playing protected content, such as movies and music the user may have |
76 * rented or purchased. | 100 * rented or purchased. |
77 * | 101 * |
78 * @param[in] plugin_data_path String containing the directory where the | 102 * @param[in] plugin_data_path String containing the directory where the |
79 * plugin settings are stored. | 103 * plugin settings are stored. |
80 * | 104 * |
81 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure. | 105 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
135 * | 159 * |
136 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure. | 160 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure. |
137 */ | 161 */ |
138 [version=1.2] | 162 [version=1.2] |
139 PP_Bool SetSitePermission( | 163 PP_Bool SetSitePermission( |
140 [in] str_t plugin_data_path, | 164 [in] str_t plugin_data_path, |
141 [in] PP_Flash_BrowserOperations_SettingType setting_type, | 165 [in] PP_Flash_BrowserOperations_SettingType setting_type, |
142 [in] uint32_t site_count, | 166 [in] uint32_t site_count, |
143 [in, size_is(site_count)] PP_Flash_BrowserOperations_SiteSetting[] sites); | 167 [in, size_is(site_count)] PP_Flash_BrowserOperations_SiteSetting[] sites); |
144 }; | 168 }; |
OLD | NEW |