| // Copyright 2020 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module network.mojom; |
| // Enum types for the sandbox attributes of the main resource. |
| // TODO(https://crbug.com/1041376): Parse the flags in the network service. |
| // |
| // See content/browser/renderer_host/sandbox_flags.md for more details about how |
| // the web-layer components (i.e. //content and Blink) consume and apply these |
| // flags. |
| |
| [Extensible] |
| enum WebSandboxFlags { |
| kNone = 0, |
| |
| kNavigation = 1, // 1 << 0 |
| kPlugins = 2, // 1 << 1 |
| kOrigin = 4, // 1 << 2 |
| kForms = 8, // 1 << 3 |
| kScripts = 16, // 1 << 4 |
| kTopNavigation = 32, // 1 << 5 |
| |
| // See https://www.w3.org/Bugs/Public/show_bug.cgi?id=12393 |
| kPopups = 64, // 1 << 6 |
| |
| kAutomaticFeatures = 128, // 1 << 7 |
| kPointerLock = 256, // 1 << 8 |
| kDocumentDomain = 512, // 1 << 9 |
| |
| // See https://w3c.github.io/screen-orientation/#dfn-sandboxed-orientation-lock-browsing-context-flag. |
| kOrientationLock = 1024, // 1 << 10 |
| |
| kPropagatesToAuxiliaryBrowsingContexts = 2048, // 1 << 11 |
| kModals = 4096, // 1 << 12 |
| |
| // See https://w3c.github.io/presentation-api/#sandboxing-and-the-allow-presentation-keyword |
| kPresentationController = 8192, // 1 << 13 |
| |
| // See https://github.com/WICG/interventions/issues/42. |
| kTopNavigationByUserActivation = 16384, // 1 << 14 |
| |
| // See https://crbug.com/539938 |
| kDownloads = 32768, // 1 << 15 |
| |
| kStorageAccessByUserActivation = 65536, // 1 << 16 |
| |
| kAll = -1, // Mask with all bits set. |
| }; |