OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // Registers a URL scheme to be treated as display-isolated. This means | 54 // Registers a URL scheme to be treated as display-isolated. This means |
55 // that pages cannot display these URLs unless they are from the same | 55 // that pages cannot display these URLs unless they are from the same |
56 // scheme. For example, pages in other origin cannot create iframes or | 56 // scheme. For example, pages in other origin cannot create iframes or |
57 // hyperlinks to URLs with the scheme. | 57 // hyperlinks to URLs with the scheme. |
58 BLINK_EXPORT static void registerURLSchemeAsDisplayIsolated(const WebString&
); | 58 BLINK_EXPORT static void registerURLSchemeAsDisplayIsolated(const WebString&
); |
59 | 59 |
60 // Registers a URL scheme to generate mixed content warnings when resources
whose | 60 // Registers a URL scheme to generate mixed content warnings when resources
whose |
61 // schemes are not registered as "secure" are embedded. | 61 // schemes are not registered as "secure" are embedded. |
62 BLINK_EXPORT static void registerURLSchemeAsRestrictingMixedContent(const We
bString&); | 62 BLINK_EXPORT static void registerURLSchemeAsRestrictingMixedContent(const We
bString&); |
63 | 63 |
64 // Registers a URL scheme to not generate mixed content warnings when | 64 // Subresources transported by secure schemes do not trigger mixed content |
65 // included by page whose scheme is registed as restricting mixed content. | 65 // warnings. For example, https and data are secure schemes because they |
| 66 // cannot be corrupted by active network attackers. |
66 BLINK_EXPORT static void registerURLSchemeAsSecure(const WebString&); | 67 BLINK_EXPORT static void registerURLSchemeAsSecure(const WebString&); |
67 | 68 |
| 69 // Returns true if the scheme has been registered as a secure scheme. |
| 70 BLINK_EXPORT static bool shouldTreatURLSchemeAsSecure(const WebString&); |
| 71 |
68 // Registers a non-HTTP URL scheme which can be sent CORS requests. | 72 // Registers a non-HTTP URL scheme which can be sent CORS requests. |
69 BLINK_EXPORT static void registerURLSchemeAsCORSEnabled(const WebString&); | 73 BLINK_EXPORT static void registerURLSchemeAsCORSEnabled(const WebString&); |
70 | 74 |
71 // Registers a URL scheme whose resources can be loaded regardless of a page
's Content Security Policy. | 75 // Registers a URL scheme whose resources can be loaded regardless of a page
's Content Security Policy. |
72 BLINK_EXPORT static void registerURLSchemeAsBypassingContentSecurityPolicy(c
onst WebString&); | 76 BLINK_EXPORT static void registerURLSchemeAsBypassingContentSecurityPolicy(c
onst WebString&); |
73 | 77 |
74 // Registers a URL scheme for which some kinds of resources bypass Content S
ecurity Policy. | 78 // Registers a URL scheme for which some kinds of resources bypass Content S
ecurity Policy. |
75 // This enum should be kept in sync with Source/platform/weborigin/SchemeReg
istry.h. | 79 // This enum should be kept in sync with Source/platform/weborigin/SchemeReg
istry.h. |
76 // Enforced in AssertMatchingEnums.cpp. | 80 // Enforced in AssertMatchingEnums.cpp. |
77 enum PolicyAreas : uint32_t { | 81 enum PolicyAreas : uint32_t { |
(...skipping 27 matching lines...) Expand all Loading... |
105 // by bookmarklets or javascript: URLs typed in the omnibox. | 109 // by bookmarklets or javascript: URLs typed in the omnibox. |
106 BLINK_EXPORT static void registerURLSchemeAsNotAllowingJavascriptURLs(const
WebString&); | 110 BLINK_EXPORT static void registerURLSchemeAsNotAllowingJavascriptURLs(const
WebString&); |
107 | 111 |
108 private: | 112 private: |
109 WebSecurityPolicy(); | 113 WebSecurityPolicy(); |
110 }; | 114 }; |
111 | 115 |
112 } // namespace blink | 116 } // namespace blink |
113 | 117 |
114 #endif | 118 #endif |
OLD | NEW |