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

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

Issue 5340003: Make a new test to enforce the sizes of all structs and enums in the C API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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/c/dev/ppb_scrollbar_dev.h ('k') | ppapi/c/dev/ppp_printing_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef PPAPI_C_DEV_PPB_URL_UTIL_DEV_H_ 5 #ifndef PPAPI_C_DEV_PPB_URL_UTIL_DEV_H_
6 #define PPAPI_C_DEV_PPB_URL_UTIL_DEV_H_ 6 #define PPAPI_C_DEV_PPB_URL_UTIL_DEV_H_
7 7
8 #include "ppapi/c/pp_bool.h" 8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_instance.h" 9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_stdint.h" 10 #include "ppapi/c/pp_stdint.h"
(...skipping 14 matching lines...) Expand all
25 // integral part of the path. 25 // integral part of the path.
26 // 26 //
27 // If the component is not present at all, begin will be 0 and len will be -1. 27 // If the component is not present at all, begin will be 0 and len will be -1.
28 // If the component is present but empty, the length will be 0 instead. Example: 28 // If the component is present but empty, the length will be 0 instead. Example:
29 // http://foo/search -> query = (0, -1) 29 // http://foo/search -> query = (0, -1)
30 // http://foo/search? -> query = (18, 0) 30 // http://foo/search? -> query = (18, 0)
31 struct PP_UrlComponent_Dev { 31 struct PP_UrlComponent_Dev {
32 int32_t begin; 32 int32_t begin;
33 int32_t len; 33 int32_t len;
34 }; 34 };
35 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_UrlComponent_Dev, 8);
35 36
36 struct PP_UrlComponents_Dev { 37 struct PP_UrlComponents_Dev {
37 struct PP_UrlComponent_Dev scheme; 38 struct PP_UrlComponent_Dev scheme;
38 struct PP_UrlComponent_Dev username; 39 struct PP_UrlComponent_Dev username;
39 struct PP_UrlComponent_Dev password; 40 struct PP_UrlComponent_Dev password;
40 struct PP_UrlComponent_Dev host; 41 struct PP_UrlComponent_Dev host;
41 struct PP_UrlComponent_Dev port; 42 struct PP_UrlComponent_Dev port;
42 struct PP_UrlComponent_Dev path; 43 struct PP_UrlComponent_Dev path;
43 struct PP_UrlComponent_Dev query; 44 struct PP_UrlComponent_Dev query;
44 struct PP_UrlComponent_Dev ref; 45 struct PP_UrlComponent_Dev ref;
45 }; 46 };
47 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_UrlComponents_Dev, 64);
46 48
47 // URL encoding: URLs are supplied to this interface as NULL-terminated 8-bit 49 // URL encoding: URLs are supplied to this interface as NULL-terminated 8-bit
48 // strings. You can pass non-ASCII characters which will be interpreted as 50 // strings. You can pass non-ASCII characters which will be interpreted as
49 // UTF-8. Canonicalized URL strings returned by these functions will be ASCII 51 // UTF-8. Canonicalized URL strings returned by these functions will be ASCII
50 // except for the reference fragment (stuff after the '#') which will be 52 // except for the reference fragment (stuff after the '#') which will be
51 // encoded as UTF-8. 53 // encoded as UTF-8.
52 struct PPB_UrlUtil_Dev { 54 struct PPB_UrlUtil_Dev {
53 // Canonicalizes the given URL string according to the rules of the host 55 // Canonicalizes the given URL string according to the rules of the host
54 // browser. If the URL is invalid or the var is not a string, this will 56 // browser. If the URL is invalid or the var is not a string, this will
55 // return a Null var and the components structure will be unchanged. 57 // return a Null var and the components structure will be unchanged.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 104
103 // Checks whether the document containing the |active| plugin instance can 105 // Checks whether the document containing the |active| plugin instance can
104 // access the document containing the |target| plugin instance according to 106 // access the document containing the |target| plugin instance according to
105 // the security policy of the browser. This includes the same origin policy 107 // the security policy of the browser. This includes the same origin policy
106 // and any cross-origin capabilities enabled by the document. If either of 108 // and any cross-origin capabilities enabled by the document. If either of
107 // the plugin instances are invalid, returns PP_FALSE. 109 // the plugin instances are invalid, returns PP_FALSE.
108 PP_Bool (*DocumentCanAccessDocument)(PP_Instance active, PP_Instance target); 110 PP_Bool (*DocumentCanAccessDocument)(PP_Instance active, PP_Instance target);
109 }; 111 };
110 112
111 #endif // PPAPI_C_DEV_PPB_URL_UTIL_DEV_H_ 113 #endif // PPAPI_C_DEV_PPB_URL_UTIL_DEV_H_
OLDNEW
« no previous file with comments | « ppapi/c/dev/ppb_scrollbar_dev.h ('k') | ppapi/c/dev/ppp_printing_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698