| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2013 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 #ifndef SandboxFlags_h | 27 #ifndef SandboxFlags_h |
| 28 #define SandboxFlags_h | 28 #define SandboxFlags_h |
| 29 | 29 |
| 30 #include "core/dom/SpaceSplitString.h" | 30 #include "core/dom/SpaceSplitString.h" |
| 31 #include "wtf/Forward.h" | 31 #include "wtf/Forward.h" |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 enum SandboxFlag { | 35 enum SandboxFlag { |
| 36 // See http://www.whatwg.org/specs/web-apps/current-work/#attr-iframe-sandbox
for a list of the sandbox flags. | 36 // See http://www.whatwg.org/specs/web-apps/current-work/#attr-iframe-sandbox |
| 37 // for a list of the sandbox flags. |
| 37 SandboxNone = 0, | 38 SandboxNone = 0, |
| 38 SandboxNavigation = 1, | 39 SandboxNavigation = 1, |
| 39 SandboxPlugins = 1 << 1, | 40 SandboxPlugins = 1 << 1, |
| 40 SandboxOrigin = 1 << 2, | 41 SandboxOrigin = 1 << 2, |
| 41 SandboxForms = 1 << 3, | 42 SandboxForms = 1 << 3, |
| 42 SandboxScripts = 1 << 4, | 43 SandboxScripts = 1 << 4, |
| 43 SandboxTopNavigation = 1 << 5, | 44 SandboxTopNavigation = 1 << 5, |
| 44 SandboxPopups = | 45 // See https://www.w3.org/Bugs/Public/show_bug.cgi?id=12393 |
| 45 1 << 6, // See https://www.w3.org/Bugs/Public/show_bug.cgi?id=12393 | 46 SandboxPopups = 1 << 6, |
| 46 SandboxAutomaticFeatures = 1 << 7, | 47 SandboxAutomaticFeatures = 1 << 7, |
| 47 SandboxPointerLock = 1 << 8, | 48 SandboxPointerLock = 1 << 8, |
| 48 SandboxDocumentDomain = 1 << 9, | 49 SandboxDocumentDomain = 1 << 9, |
| 49 SandboxOrientationLock = | 50 // See |
| 50 1 | 51 // https://w3c.github.io/screen-orientation/#dfn-sandboxed-orientation-lock-br
owsing-context-flag. |
| 51 << 10, // See https://w3c.github.io/screen-orientation/#dfn-sandboxed-ori
entation-lock-browsing-context-flag. | 52 SandboxOrientationLock = 1 << 10, |
| 52 SandboxPropagatesToAuxiliaryBrowsingContexts = 1 << 11, | 53 SandboxPropagatesToAuxiliaryBrowsingContexts = 1 << 11, |
| 53 SandboxModals = 1 << 12, | 54 SandboxModals = 1 << 12, |
| 54 SandboxPresentation = | 55 // See |
| 55 1 | 56 // https://w3c.github.io/presentation-api/#sandboxing-and-the-allow-presentati
on-keyword |
| 56 << 13, // See https://w3c.github.io/presentation-api/#sandboxing-and
-the-allow-presentation-keyword | 57 SandboxPresentation = 1 << 13, |
| 57 SandboxAll = -1 // Mask with all bits set to 1. | 58 SandboxAll = -1 // Mask with all bits set to 1. |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 typedef int SandboxFlags; | 61 typedef int SandboxFlags; |
| 61 | 62 |
| 62 SandboxFlags parseSandboxPolicy(const SpaceSplitString& policy, | 63 SandboxFlags parseSandboxPolicy(const SpaceSplitString& policy, |
| 63 String& invalidTokensErrorMessage); | 64 String& invalidTokensErrorMessage); |
| 64 | 65 |
| 65 } // namespace blink | 66 } // namespace blink |
| 66 | 67 |
| 67 #endif | 68 #endif |
| OLD | NEW |