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

Side by Side Diff: ppapi/c/dev/ppb_url_util_dev.h

Issue 23444004: Add GetPluginRefererURL to PPB_URLUtil_Dev interface to get the 'Referer' HTTP header value that wa… (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 3 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
« no previous file with comments | « ppapi/api/dev/ppb_url_util_dev.idl ('k') | ppapi/cpp/dev/url_util_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /* From dev/ppb_url_util_dev.idl modified Fri Dec 16 17:34:59 2011. */ 6 /* From dev/ppb_url_util_dev.idl modified Wed Aug 28 19:09:17 2013. */
7 7
8 #ifndef PPAPI_C_DEV_PPB_URL_UTIL_DEV_H_ 8 #ifndef PPAPI_C_DEV_PPB_URL_UTIL_DEV_H_
9 #define PPAPI_C_DEV_PPB_URL_UTIL_DEV_H_ 9 #define PPAPI_C_DEV_PPB_URL_UTIL_DEV_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h" 12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h" 13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_stdint.h" 14 #include "ppapi/c/pp_stdint.h"
15 #include "ppapi/c/pp_var.h" 15 #include "ppapi/c/pp_var.h"
16 16
17 #define PPB_URLUTIL_DEV_INTERFACE_0_6 "PPB_URLUtil(Dev);0.6" 17 #define PPB_URLUTIL_DEV_INTERFACE_0_6 "PPB_URLUtil(Dev);0.6"
18 #define PPB_URLUTIL_DEV_INTERFACE PPB_URLUTIL_DEV_INTERFACE_0_6 18 #define PPB_URLUTIL_DEV_INTERFACE_0_7 "PPB_URLUtil(Dev);0.7"
19 #define PPB_URLUTIL_DEV_INTERFACE PPB_URLUTIL_DEV_INTERFACE_0_7
19 20
20 /** 21 /**
21 * @file 22 * @file
22 * This file defines the <code>PPB_URLUtil_Dev</code> interface. 23 * This file defines the <code>PPB_URLUtil_Dev</code> interface.
23 */ 24 */
24 25
25 26
26 /** 27 /**
27 * @addtogroup Structs 28 * @addtogroup Structs
28 * @{ 29 * @{
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 * @addtogroup Interfaces 71 * @addtogroup Interfaces
71 * @{ 72 * @{
72 */ 73 */
73 /* 74 /*
74 * URL encoding: URLs are supplied to this interface as NULL-terminated 8-bit 75 * URL encoding: URLs are supplied to this interface as NULL-terminated 8-bit
75 * strings. You can pass non-ASCII characters which will be interpreted as 76 * strings. You can pass non-ASCII characters which will be interpreted as
76 * UTF-8. Canonicalized URL strings returned by these functions will be ASCII 77 * UTF-8. Canonicalized URL strings returned by these functions will be ASCII
77 * except for the reference fragment (stuff after the '#') which will be 78 * except for the reference fragment (stuff after the '#') which will be
78 * encoded as UTF-8. 79 * encoded as UTF-8.
79 */ 80 */
80 struct PPB_URLUtil_Dev_0_6 { 81 struct PPB_URLUtil_Dev_0_7 {
81 /* 82 /*
82 * Canonicalizes the given URL string according to the rules of the host 83 * Canonicalizes the given URL string according to the rules of the host
83 * browser. If the URL is invalid or the var is not a string, this will 84 * browser. If the URL is invalid or the var is not a string, this will
84 * return a Null var and the components structure will be unchanged. 85 * return a Null var and the components structure will be unchanged.
85 * 86 *
86 * The components pointer, if non-NULL and the canonicalized URL is valid, 87 * The components pointer, if non-NULL and the canonicalized URL is valid,
87 * will identify the components of the resulting URL. Components may be NULL 88 * will identify the components of the resulting URL. Components may be NULL
88 * to specify that no component information is necessary. 89 * to specify that no component information is necessary.
89 */ 90 */
90 struct PP_Var (*Canonicalize)(struct PP_Var url, 91 struct PP_Var (*Canonicalize)(struct PP_Var url,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 * attribute on the <embed> element, but the rules are obscure and different 157 * attribute on the <embed> element, but the rules are obscure and different
157 * based on whether the plugin is loaded from an <embed> element or an 158 * based on whether the plugin is loaded from an <embed> element or an
158 * <object> element. 159 * <object> element.
159 * The components pointer, if non-NULL and the canonicalized URL is valid, 160 * The components pointer, if non-NULL and the canonicalized URL is valid,
160 * will identify the components of the resulting URL. Components may be NULL 161 * will identify the components of the resulting URL. Components may be NULL
161 * to specify that no component information is necessary. 162 * to specify that no component information is necessary.
162 */ 163 */
163 struct PP_Var (*GetPluginInstanceURL)( 164 struct PP_Var (*GetPluginInstanceURL)(
164 PP_Instance instance, 165 PP_Instance instance,
165 struct PP_URLComponents_Dev* components); 166 struct PP_URLComponents_Dev* components);
167 /*
168 * Returns the Referrer URL of the HTTP request that loaded the plugin. This
169 * is the value of the 'Referer' header of the request. An undefined value
170 * means the 'Referer' header was absent.
171 * The components pointer, if non-NULL and the canonicalized URL is valid,
172 * will identify the components of the resulting URL. Components may be NULL
173 * to specify that no component information is necessary.
174 */
175 struct PP_Var (*GetPluginReferrerURL)(
176 PP_Instance instance,
177 struct PP_URLComponents_Dev* components);
178 };
179
180 typedef struct PPB_URLUtil_Dev_0_7 PPB_URLUtil_Dev;
181
182 struct PPB_URLUtil_Dev_0_6 {
183 struct PP_Var (*Canonicalize)(struct PP_Var url,
184 struct PP_URLComponents_Dev* components);
185 struct PP_Var (*ResolveRelativeToURL)(
186 struct PP_Var base_url,
187 struct PP_Var relative_string,
188 struct PP_URLComponents_Dev* components);
189 struct PP_Var (*ResolveRelativeToDocument)(
190 PP_Instance instance,
191 struct PP_Var relative_string,
192 struct PP_URLComponents_Dev* components);
193 PP_Bool (*IsSameSecurityOrigin)(struct PP_Var url_a, struct PP_Var url_b);
194 PP_Bool (*DocumentCanRequest)(PP_Instance instance, struct PP_Var url);
195 PP_Bool (*DocumentCanAccessDocument)(PP_Instance active, PP_Instance target);
196 struct PP_Var (*GetDocumentURL)(PP_Instance instance,
197 struct PP_URLComponents_Dev* components);
198 struct PP_Var (*GetPluginInstanceURL)(
199 PP_Instance instance,
200 struct PP_URLComponents_Dev* components);
166 }; 201 };
167
168 typedef struct PPB_URLUtil_Dev_0_6 PPB_URLUtil_Dev;
169 /** 202 /**
170 * @} 203 * @}
171 */ 204 */
172 205
173 #endif /* PPAPI_C_DEV_PPB_URL_UTIL_DEV_H_ */ 206 #endif /* PPAPI_C_DEV_PPB_URL_UTIL_DEV_H_ */
174 207
OLDNEW
« no previous file with comments | « ppapi/api/dev/ppb_url_util_dev.idl ('k') | ppapi/cpp/dev/url_util_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698