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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ 5 #ifndef CONTENT_COMMON_FRAME_REPLICATION_STATE_H_
6 #define CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ 6 #define CONTENT_COMMON_FRAME_REPLICATION_STATE_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "url/origin.h" 9 #include "url/origin.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 // 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.
14 // render_frame_impl.cc.
15 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 =)
16 // For a list of sandbox flags, see
17 // http://www.whatwg.org/specs/web-apps/current-work/#attr-iframe-sandbox
18 NONE = 0,
19 NAVIGATION = 1,
20 PLUGINS = 1 << 1,
21 ORIGIN = 1 << 2,
22 FORMS = 1 << 3,
23 SCRIPTS = 1 << 4,
24 TOP_NAVIGATION = 1 << 5,
25 POPUPS = 1 << 6,
26 AUTOMATIC_FEATURES = 1 << 7,
27 POINTER_LOCK = 1 << 8,
28 DOCUMENT_DOMAIN = 1 << 9,
29 ORIENTATION_LOCK = 1 << 10,
30 ALL = -1
31 };
32
13 // This structure holds information that needs to be replicated from a 33 // This structure holds information that needs to be replicated from a
14 // RenderFrame to any of its associated RenderFrameProxies. 34 // RenderFrame to any of its associated RenderFrameProxies.
15 struct CONTENT_EXPORT FrameReplicationState { 35 struct CONTENT_EXPORT FrameReplicationState {
16 FrameReplicationState(); 36 FrameReplicationState();
17 ~FrameReplicationState(); 37 ~FrameReplicationState();
18 38
19 // Current serialized security origin of the frame. Unique origins are 39 // Current serialized security origin of the frame. Unique origins are
20 // represented as the string "null" per RFC 6454. 40 // represented as the string "null" per RFC 6454.
21 url::Origin origin; 41 url::Origin origin;
22 42
43 // Current sandbox flags of the frame.
44 SandboxFlags sandbox_flags;
45
23 // TODO(alexmos): Eventually, this structure can also hold other state that 46 // TODO(alexmos): Eventually, this structure can also hold other state that
24 // needs to be replicated, such as frame sizing info. 47 // needs to be replicated, such as frame sizing info.
25 }; 48 };
26 49
27 } // namespace content 50 } // namespace content
28 51
29 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ 52 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698