1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be found
3 // in the LICENSE file.
5 #ifndef WebSandboxFlags_h
6 #define WebSandboxFlags_h
8 #include "../platform/WebCommon.h"
12 // See http://www.whatwg.org/specs/web-apps/current-work/#attr-iframe-sandbox
13 // for a list of the sandbox flags. This enum should be kept in sync with
14 // Source/core/dom/SandboxFlags.h. Enforced in AssertMatchingEnums.cpp
15 enum class WebSandboxFlags
: int {
22 TopNavigation
= 1 << 5,
24 AutomaticFeatures
= 1 << 7,
26 DocumentDomain
= 1 << 9,
27 OrientationLock
= 1 << 10,
28 PropagatesToAuxiliaryBrowsingContexts
= 1 << 11,
33 inline WebSandboxFlags
operator&(WebSandboxFlags a
, WebSandboxFlags b
)
35 return static_cast<WebSandboxFlags
>(static_cast<int>(a
) & static_cast<int>(b
));
38 inline WebSandboxFlags
operator~(WebSandboxFlags flags
)
40 return static_cast<WebSandboxFlags
>(~static_cast<int>(flags
));
45 #endif // WebSandboxFlags_h