| 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 24 matching lines...) Expand all Loading... |
| 35 #include "../platform/WebReferrerPolicy.h" | 35 #include "../platform/WebReferrerPolicy.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class WebSecurityOrigin; | 39 class WebSecurityOrigin; |
| 40 class WebString; | 40 class WebString; |
| 41 class WebURL; | 41 class WebURL; |
| 42 | 42 |
| 43 class WebSecurityPolicy { | 43 class WebSecurityPolicy { |
| 44 public: | 44 public: |
| 45 // Registers a URL scheme to be treated as a local scheme (i.e., with the | |
| 46 // same security rules as those applied to "file" URLs). This means that | |
| 47 // normal pages cannot link to or access URLs of this scheme. | |
| 48 BLINK_EXPORT static void registerURLSchemeAsLocal(const WebString&); | |
| 49 | |
| 50 // Registers a URL scheme to be treated as a noAccess scheme. This means | |
| 51 // that pages loaded with this URL scheme cannot access pages loaded with | |
| 52 // any other URL scheme. | |
| 53 BLINK_EXPORT static void registerURLSchemeAsNoAccess(const WebString&); | |
| 54 | |
| 55 // Registers a URL scheme to be treated as display-isolated. This means | 45 // Registers a URL scheme to be treated as display-isolated. This means |
| 56 // that pages cannot display these URLs unless they are from the same | 46 // that pages cannot display these URLs unless they are from the same |
| 57 // scheme. For example, pages in other origin cannot create iframes or | 47 // scheme. For example, pages in other origin cannot create iframes or |
| 58 // hyperlinks to URLs with the scheme. | 48 // hyperlinks to URLs with the scheme. |
| 59 BLINK_EXPORT static void registerURLSchemeAsDisplayIsolated(const WebString&); | 49 BLINK_EXPORT static void registerURLSchemeAsDisplayIsolated(const WebString&); |
| 60 | 50 |
| 61 // Subresources transported by secure schemes do not trigger mixed content | |
| 62 // warnings. For example, https and data are secure schemes because they | |
| 63 // cannot be corrupted by active network attackers. | |
| 64 BLINK_EXPORT static void registerURLSchemeAsSecure(const WebString&); | |
| 65 | |
| 66 // Registers a non-HTTP URL scheme which can be sent CORS requests. | |
| 67 BLINK_EXPORT static void registerURLSchemeAsCORSEnabled(const WebString&); | |
| 68 | |
| 69 // Registers a URL scheme that can register a ServiceWorker. | 51 // Registers a URL scheme that can register a ServiceWorker. |
| 70 BLINK_EXPORT static void registerURLSchemeAsAllowingServiceWorkers( | 52 BLINK_EXPORT static void registerURLSchemeAsAllowingServiceWorkers( |
| 71 const WebString&); | 53 const WebString&); |
| 72 | 54 |
| 73 // Registers an HTTP-like URL scheme that supports the Fetch API. | 55 // Registers an HTTP-like URL scheme that supports the Fetch API. |
| 74 BLINK_EXPORT static void registerURLSchemeAsSupportingFetchAPI( | 56 BLINK_EXPORT static void registerURLSchemeAsSupportingFetchAPI( |
| 75 const WebString&); | 57 const WebString&); |
| 76 | 58 |
| 77 // Registers a URL scheme whose resources can be loaded regardless of a page's | 59 // Registers a URL scheme whose resources can be loaded regardless of a page's |
| 78 // Content Security Policy. | 60 // Content Security Policy. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 BLINK_EXPORT static void registerURLSchemeAsAllowedForReferrer( | 124 BLINK_EXPORT static void registerURLSchemeAsAllowedForReferrer( |
| 143 const WebString&); | 125 const WebString&); |
| 144 | 126 |
| 145 private: | 127 private: |
| 146 WebSecurityPolicy(); | 128 WebSecurityPolicy(); |
| 147 }; | 129 }; |
| 148 | 130 |
| 149 } // namespace blink | 131 } // namespace blink |
| 150 | 132 |
| 151 #endif | 133 #endif |
| OLD | NEW |