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

Unified Diff: content/common/frame_replication_state.h

Issue 1141283002: Replicate whether a frame is in a document or shadow tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 5 years, 7 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 86e53b9884b128ae559107b38a46a5c25f52868b..589fa4a055646a02fb51ffdcd017c87929776184 100644
--- a/content/common/frame_replication_state.h
+++ b/content/common/frame_replication_state.h
@@ -8,6 +8,10 @@
#include "content/common/content_export.h"
#include "url/origin.h"
+namespace blink {
+enum class WebTreeScopeType;
+}
+
namespace content {
// Sandboxing flags for iframes. These flags are set via an iframe's "sandbox"
@@ -45,7 +49,9 @@ inline SandboxFlags operator~(SandboxFlags flags) {
// RenderFrame and any of its associated RenderFrameProxies.
struct CONTENT_EXPORT FrameReplicationState {
FrameReplicationState();
- FrameReplicationState(const std::string& name, SandboxFlags sandbox_flags);
+ FrameReplicationState(blink::WebTreeScopeType scope,
+ const std::string& name,
+ SandboxFlags sandbox_flags);
~FrameReplicationState();
// Current serialized security origin of the frame. Unique origins are
@@ -86,6 +92,14 @@ struct CONTENT_EXPORT FrameReplicationState {
// frame using its updated name (e.g., using window.open(url, frame_name)).
std::string name;
+ // Whether the frame is in a document tree or a shadow tree, per the Shadow
+ // DOM spec: https://w3c.github.io/webcomponents/spec/shadow/
+ // Note: This should really be const, as it can never change once a frame is
+ // created. However, making it const makes it a pain to embed into IPC message
+ // params: having a const member implicitly deletes the copy assignment
+ // operator.
+ blink::WebTreeScopeType scope;
+
// 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