Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1456)

Unified Diff: public/web/WebSandboxFlags.h

Issue 793493003: Prepare to replicate sandbox flags for OOPIF (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Source/web/WebRemoteFrameImpl.cpp ('K') | « public/web/WebRemoteFrame.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebSandboxFlags.h
diff --git a/public/web/WebSpeechGrammar.h b/public/web/WebSandboxFlags.h
similarity index 65%
copy from public/web/WebSpeechGrammar.h
copy to public/web/WebSandboxFlags.h
index 3a062bbb29f057eafb305816a2b3cb4e1a358ae4..c603f79868d8a7196e78eaab66f66e01aa3e5a9d 100644
--- a/public/web/WebSpeechGrammar.h
+++ b/public/web/WebSandboxFlags.h
@@ -23,37 +23,32 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebSpeechGrammar_h
-#define WebSpeechGrammar_h
+#ifndef WebSandboxFlags_h
dcheng 2015/01/08 22:50:45 I'd probably reupload this with --no-find-copies.
alexmos 2015/01/09 19:49:57 Done. Thanks for the pointers!
+#define WebSandboxFlags_h
#include "../platform/WebCommon.h"
-#include "../platform/WebPrivatePtr.h"
-#include "../platform/WebURL.h"
namespace blink {
-class SpeechGrammar;
-
-class WebSpeechGrammar {
-public:
- WebSpeechGrammar() { }
- WebSpeechGrammar(const WebSpeechGrammar& grammar) { assign(grammar); }
- ~WebSpeechGrammar() { reset(); }
-
- BLINK_EXPORT WebURL src() const;
- BLINK_EXPORT float weight() const;
-
- BLINK_EXPORT void reset();
- BLINK_EXPORT void assign(const WebSpeechGrammar&);
-
-#if BLINK_IMPLEMENTATION
- WebSpeechGrammar& operator=(SpeechGrammar*);
-#endif
-
-private:
- WebPrivatePtr<SpeechGrammar> m_private;
+// See http://www.whatwg.org/specs/web-apps/current-work/#attr-iframe-sandbox
+// for a list of the sandbox flags. This enum should be kept in sync with
+// Source/core/dom/SandboxFlags.h. Enforced in AssertMatchingEnums.cpp
+enum WebSandboxFlags : int {
dcheng 2015/01/08 22:50:45 How inconvenient would it be to make this a strong
alexmos 2015/01/09 19:49:57 Done. I'm all for it, especially since I already
+ WebSandboxNone = 0,
+ WebSandboxNavigation = 1,
+ WebSandboxPlugins = 1 << 1,
+ WebSandboxOrigin = 1 << 2,
+ WebSandboxForms = 1 << 3,
+ WebSandboxScripts = 1 << 4,
+ WebSandboxTopNavigation = 1 << 5,
+ WebSandboxPopups = 1 << 6,
+ WebSandboxAutomaticFeatures = 1 << 7,
+ WebSandboxPointerLock = 1 << 8,
+ WebSandboxDocumentDomain = 1 << 9,
+ WebSandboxOrientationLock = 1 << 10,
+ WebSandboxAll = -1
};
} // namespace blink
-#endif // WebSpeechGrammar_h
+#endif // WebSandboxFlags_h
« Source/web/WebRemoteFrameImpl.cpp ('K') | « public/web/WebRemoteFrame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698