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

Unified Diff: content/common/frame_replication_state.h

Issue 837283003: Start replicating sandbox flags for OOPIF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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
Index: content/common/frame_replication_state.h
diff --git a/content/common/frame_replication_state.h b/content/common/frame_replication_state.h
index bde088b87d47ec39b0b0fbaeec4a0abe9646b61c..ad63e0d3708e807e3dfcac3e1140494f562d4e40 100644
--- a/content/common/frame_replication_state.h
+++ b/content/common/frame_replication_state.h
@@ -10,6 +10,26 @@
namespace content {
+// Must be kept in sync with blink::WebSandboxFlags. Enforced in
Charlie Reis 2015/01/08 22:17:26 We should document what this is for, since it coul
alexmos 2015/01/09 20:43:25 Done.
+// render_frame_impl.cc.
+enum class SandboxFlags : int {
alexmos 2015/01/08 01:51:41 Made this an "enum class" so I could forward-decla
Charlie Reis 2015/01/08 22:17:26 There was a big C++11 discussion thread on this an
dcheng 2015/01/09 07:56:57 Yep, this is fine =)
+ // For a list of sandbox flags, see
+ // http://www.whatwg.org/specs/web-apps/current-work/#attr-iframe-sandbox
+ NONE = 0,
+ NAVIGATION = 1,
+ PLUGINS = 1 << 1,
+ ORIGIN = 1 << 2,
+ FORMS = 1 << 3,
+ SCRIPTS = 1 << 4,
+ TOP_NAVIGATION = 1 << 5,
+ POPUPS = 1 << 6,
+ AUTOMATIC_FEATURES = 1 << 7,
+ POINTER_LOCK = 1 << 8,
+ DOCUMENT_DOMAIN = 1 << 9,
+ ORIENTATION_LOCK = 1 << 10,
+ ALL = -1
+};
+
// This structure holds information that needs to be replicated from a
// RenderFrame to any of its associated RenderFrameProxies.
struct CONTENT_EXPORT FrameReplicationState {
@@ -20,6 +40,9 @@ struct CONTENT_EXPORT FrameReplicationState {
// represented as the string "null" per RFC 6454.
url::Origin origin;
+ // Current sandbox flags of the frame.
+ SandboxFlags sandbox_flags;
+
// TODO(alexmos): Eventually, this structure can also hold other state that
// needs to be replicated, such as frame sizing info.
};

Powered by Google App Engine
This is Rietveld 408576698