Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(751)

Side by Side Diff: ppapi/api/private/ppp_flash_browser_operations.idl

Issue 10391173: Pepper Flash settings integration: implement "deauthorize content licenses". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.1
12 }; 13 };
13 14
15 [assert_size(4)]
16 enum PP_Flash_BrowserOperations_SettingType {
17 PP_FLASH_BROWSEROPERATIONS_SETTINGTYPE_CAMERAMIC = 0,
18 PP_FLASH_BROWSEROPERATIONS_SETTINGTYPE_PEERNETWORKING = 1
19 };
20
21 [assert_size(4)]
22 enum PP_Flash_BrowserOperations_Permission {
23 // This value is only used with <code>SetSitePermission()</code>.
24 PP_FLASH_BROWSEROPERATIONS_PERMISSION_DEFAULT = 0,
25 PP_FLASH_BROWSEROPERATIONS_PERMISSION_ALLOW = 1,
26 PP_FLASH_BROWSEROPERATIONS_PERMISSION_BLOCK = 2,
27 PP_FLASH_BROWSEROPERATIONS_PERMISSION_ASK = 3
28 };
29
30 [assert_size(24)]
31 struct PP_Flash_BrowserOperations_SiteSetting {
32 PP_Var site;
33 PP_Flash_BrowserOperations_Permission permission;
34 // Makes the size consistent across compilers.
35 int32_t padding;
36 };
37
38 typedef void PPB_Flash_BrowserOperations_GetSettingsCallback(
39 [inout] mem_t user_data,
40 [in] PP_Bool success,
41 [in] PP_Flash_BrowserOperations_Permission default_permission,
42 [in] uint32_t site_count,
43 [in, size_is(site_count)] PP_Flash_BrowserOperations_SiteSetting[] sites);
44
14 /** 45 /**
15 * This interface allows the browser to request the plugin do things. 46 * This interface allows the browser to request the plugin do things.
16 */ 47 */
17 interface PPP_Flash_BrowserOperations { 48 interface PPP_Flash_BrowserOperations {
18 /** 49 /**
19 * This function allows the plugin to implement the "Clear site data" feature. 50 * This function allows the plugin to implement the "Clear site data" feature.
20 * 51 *
21 * @plugin_data_path String containing the directory where the plugin data is 52 * @plugin_data_path String containing the directory where the plugin data is
22 * stored. On UTF16 systems (Windows), this will be encoded as UTF-8. It will 53 * stored. On UTF16 systems (Windows), this will be encoded as UTF-8. It will
23 * be an absolute path and will not have a directory separator (slash) at the 54 * be an absolute path and will not have a directory separator (slash) at the
(...skipping 10 matching lines...) Expand all
34 * 65 *
35 * @return PP_TRUE on success, PP_FALSE on failure. 66 * @return PP_TRUE on success, PP_FALSE on failure.
36 * 67 *
37 * See also the NPP_ClearSiteData function in NPAPI. 68 * See also the NPP_ClearSiteData function in NPAPI.
38 * https://wiki.mozilla.org/NPAPI:ClearSiteData 69 * https://wiki.mozilla.org/NPAPI:ClearSiteData
39 */ 70 */
40 PP_Bool ClearSiteData(str_t plugin_data_path, 71 PP_Bool ClearSiteData(str_t plugin_data_path,
41 str_t site, 72 str_t site,
42 uint64_t flags, 73 uint64_t flags,
43 uint64_t max_age); 74 uint64_t max_age);
75
76 /**
77 * Requests the plugin to deauthorize content licenses. It prevents Flash from
78 * playing protected content, such as movies and music the user may have
79 * rented or purchased.
80 *
81 * @param[in] plugin_data_path String containing the directory where the
82 * plugin settings are stored.
83 *
84 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure.
85 */
86 [version=1.1]
87 PP_Bool DeauthorizeContentLicenses([in] str_t plugin_data_path);
88
89 /**
90 * Gets permission settings. <code>callback</code> will be called exactly once
91 * to return the settings.
92 *
93 * @param[in] plugin_data_path String containing the directory where the
94 * plugin settings are stored.
95 * @param[in] setting_type What type of setting to retrieve.
96 * @param[in] callback The callback to return retrieved data.
97 * @param[inout] user_data An opaque pointer that will be passed to
98 * <code>callback</code>.
99 */
100 [version=1.1]
101 void GetPermissionSettings(
102 [in] str_t plugin_data_path,
103 [in] PP_Flash_BrowserOperations_SettingType setting_type,
104 [in] PPB_Flash_BrowserOperations_GetSettingsCallback callback,
105 [inout] mem_t user_data);
106
107 /**
108 * Sets default permission. It applies to all sites except those with
109 * site-specific settings.
110 *
111 * @param[in] plugin_data_path String containing the directory where the
112 * plugin settings are stored.
113 * @param[in] setting_type What type of setting to set.
114 * @param[in] permission The default permission.
115 * @param[in] clear_site_specific Whether to remove all site-specific
116 * settings.
117 *
118 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure.
119 */
120 [version=1.1]
121 PP_Bool SetDefaultPermission(
122 [in] str_t plugin_data_path,
123 [in] PP_Flash_BrowserOperations_SettingType setting_type,
124 [in] PP_Flash_BrowserOperations_Permission permission,
125 [in] PP_Bool clear_site_speicifc);
126
127 /**
128 * Sets site-specific permission. If a site has already got site-specific
129 * permission and it is not in <code>sites</code>, it won't be affected.
130 *
131 * @param[in] plugin_data_path String containing the directory where the
132 * plugin settings are stored.
133 * @param[in] setting_type What type of setting to set.
134 * @param[in] site_count How many items are there in <code>sites</code>.
135 * @param[in] sites The site-specific settings. If a site is specified with
136 * <code>PP_FLASH_BROWSEROPERATIONS_PERMISSION_DEFAULT</code> permission, it
137 * will be removed from the site-specific list.
138 *
139 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure.
140 */
141 [version=1.1]
142 PP_Bool SetSitePermission(
143 [in] str_t plugin_data_path,
144 [in] PP_Flash_BrowserOperations_SettingType setting_type,
145 [in] uint32_t site_count,
146 [in, size_is(site_count)] PP_Flash_BrowserOperations_SiteSetting[] sites);
44 }; 147 };
45
OLDNEW
« no previous file with comments | « content/public/common/content_constants.cc ('k') | ppapi/c/private/ppp_flash_browser_operations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698