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

Side by Side Diff: content/common/frame_replication_state.h

Issue 797813006: Replicate sandbox flags for OOPIF (Chromium part 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iframe-sandbox-flags-part1
Patch Set: Fix issue in previous rebase 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
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 15 matching lines...) Expand all
26 SCRIPTS = 1 << 4, 26 SCRIPTS = 1 << 4,
27 TOP_NAVIGATION = 1 << 5, 27 TOP_NAVIGATION = 1 << 5,
28 POPUPS = 1 << 6, 28 POPUPS = 1 << 6,
29 AUTOMATIC_FEATURES = 1 << 7, 29 AUTOMATIC_FEATURES = 1 << 7,
30 POINTER_LOCK = 1 << 8, 30 POINTER_LOCK = 1 << 8,
31 DOCUMENT_DOMAIN = 1 << 9, 31 DOCUMENT_DOMAIN = 1 << 9,
32 ORIENTATION_LOCK = 1 << 10, 32 ORIENTATION_LOCK = 1 << 10,
33 ALL = -1 33 ALL = -1
34 }; 34 };
35 35
36 inline SandboxFlags operator&(SandboxFlags a, SandboxFlags b) {
37 return static_cast<SandboxFlags>(static_cast<int>(a) & static_cast<int>(b));
38 }
39
40 inline SandboxFlags operator~(SandboxFlags flags) {
41 return static_cast<SandboxFlags>(~static_cast<int>(flags));
42 }
43
36 // This structure holds information that needs to be replicated between a 44 // This structure holds information that needs to be replicated between a
37 // RenderFrame and any of its associated RenderFrameProxies. 45 // RenderFrame and any of its associated RenderFrameProxies.
38 struct CONTENT_EXPORT FrameReplicationState { 46 struct CONTENT_EXPORT FrameReplicationState {
39 FrameReplicationState(); 47 FrameReplicationState();
40 FrameReplicationState(const std::string& name); 48 FrameReplicationState(const std::string& name);
41 ~FrameReplicationState(); 49 ~FrameReplicationState();
42 50
43 // Current serialized security origin of the frame. Unique origins are 51 // Current serialized security origin of the frame. Unique origins are
44 // represented as the string "null" per RFC 6454. 52 // represented as the string "null" per RFC 6454.
45 url::Origin origin; 53 url::Origin origin;
46 54
47 // Current sandbox flags of the frame. 55 // Current sandbox flags of the frame.
48 SandboxFlags sandbox_flags; 56 SandboxFlags sandbox_flags;
49 57
50 // The assigned name of the frame. This name can be empty, unlike the unique 58 // The assigned name of the frame. This name can be empty, unlike the unique
51 // name generated internally in the DOM tree. 59 // name generated internally in the DOM tree.
52 std::string name; 60 std::string name;
53 61
54 // TODO(alexmos): Eventually, this structure can also hold other state that 62 // TODO(alexmos): Eventually, this structure can also hold other state that
55 // needs to be replicated, such as frame sizing info. 63 // needs to be replicated, such as frame sizing info.
56 }; 64 };
57 65
58 } // namespace content 66 } // namespace content
59 67
60 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ 68 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_
OLDNEW
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698