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

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: Created 8 years, 7 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 };
35
36 typedef void PPB_Flash_BrowserOperations_GetSettingsCallback(
37 [inout] mem_t user_data,
38 [in] PP_Bool success,
39 [in] PP_Flash_BrowserOperations_Permission default_permission,
40 [in] uint32_t site_count,
41 [in, size_is(site_count)] PP_Flash_BrowserOperations_SiteSetting[] sites);
42
14 /** 43 /**
15 * This interface allows the browser to request the plugin do things. 44 * This interface allows the browser to request the plugin do things.
16 */ 45 */
17 interface PPP_Flash_BrowserOperations { 46 interface PPP_Flash_BrowserOperations {
18 /** 47 /**
19 * 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.
20 * 49 *
21 * @plugin_data_path String containing the directory where the plugin data is 50 * @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 51 * 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 52 * be an absolute path and will not have a directory separator (slash) at the
(...skipping 10 matching lines...) Expand all
34 * 63 *
35 * @return PP_TRUE on success, PP_FALSE on failure. 64 * @return PP_TRUE on success, PP_FALSE on failure.
36 * 65 *
37 * See also the NPP_ClearSiteData function in NPAPI. 66 * See also the NPP_ClearSiteData function in NPAPI.
38 * https://wiki.mozilla.org/NPAPI:ClearSiteData 67 * https://wiki.mozilla.org/NPAPI:ClearSiteData
39 */ 68 */
40 PP_Bool ClearSiteData(str_t plugin_data_path, 69 PP_Bool ClearSiteData(str_t plugin_data_path,
41 str_t site, 70 str_t site,
42 uint64_t flags, 71 uint64_t flags,
43 uint64_t max_age); 72 uint64_t max_age);
44 };
45 73
74 /**
75 * Requests the plugin to deauthorize content licenses. It prevents Flash from
76 * playing protected content, such as movies and music the user may have
77 * rented or purchased.
78 *
79 * @param[in] plugin_data_path String containing the directory where the
80 * plugin settings are stored.
81 *
82 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure.
83 */
84 [version=1.1]
85 PP_Bool DeauthorizeContentLicenses([in] str_t plugin_data_path);
86
87 /**
88 * Gets permission settings. <code>callback</code> will be called exactly once
89 * to return the settings.
90 *
91 * @param[in] plugin_data_path String containing the directory where the
92 * plugin settings are stored.
93 * @param[in] setting_type What type of setting to retrieve.
94 * @param[in] callback The callback to return retrieved data.
95 * @param[inout] user_data An opaque pointer that will be passed to
96 * <code>callback</code>.
97 */
98 [version=1.1]
99 void GetPermissionSettings(
100 [in] str_t plugin_data_path,
101 [in] PP_Flash_BrowserOperations_SettingType setting_type,
102 [in] PPB_Flash_BrowserOperations_GetSettingsCallback callback,
103 [inout] mem_t user_data);
104
105 /**
106 * Sets default permission. It applies to all sites except those with
107 * site-specific settings.
108 *
109 * @param[in] plugin_data_path String containing the directory where the
110 * plugin settings are stored.
111 * @param[in] setting_type What type of setting to set.
112 * @param[in] permission The default permission.
113 * @param[in] clear_site_specific Whether to remove all site-specific
114 * settings.
115 *
116 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure.
117 */
118 [version=1.1]
119 PP_Bool SetDefaultPermission(
120 [in] str_t plugin_data_path,
121 [in] PP_Flash_BrowserOperations_SettingType setting_type,
122 [in] PP_Flash_BrowserOperations_Permission permission,
123 [in] PP_Bool clear_site_speicifc);
124
125 /**
126 * Sets site-specific permission. If a site has already got site-specific
127 * permission and it is not in <code>sites</code>, it won't be affected.
128 *
129 * @param[in] plugin_data_path String containing the directory where the
130 * plugin settings are stored.
131 * @param[in] setting_type What type of setting to set.
132 * @param[in] site_count How many items are there in <code>sites</code>.
133 * @param[in] sites The site-specific settings. If a site is sepcified with
brettw 2012/05/17 04:53:54 sepcified - > specified
yzshen1 2012/05/17 07:31:26 Done.
134 * <code>PP_FLASH_BROWSEROPERATIONS_PERMISSION_DEFAULT</code> permission, it
135 * will be removed from the site-specific list.
136 *
137 * @return <code>PP_TRUE</code> on success, <code>PP_FALSE</code> on failure.
138 */
139 [version=1.1]
140 PP_Bool SetSitePermission(
141 [in] str_t plugin_data_path,
142 [in] PP_Flash_BrowserOperations_SettingType setting_type,
143 [in] uint32_t site_count,
144 [in, size_is(site_count)] PP_Flash_BrowserOperations_SiteSetting[] sites);
145 };
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