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

Side by Side Diff: Source/core/html/HTMLFrameOwnerElement.h

Issue 838903002: Replicate sandbox flags for OOPIF (Blink part 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@iframe-sandbox-flags-part1
Patch Set: Simplify the plumbing by making HTMLFrameOwnerElement::sandboxFlags() public 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 | « no previous file | Source/core/loader/FrameLoader.cpp » ('j') | Source/web/WebRemoteFrameImpl.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 class UpdateSuspendScope { 71 class UpdateSuspendScope {
72 public: 72 public:
73 UpdateSuspendScope(); 73 UpdateSuspendScope();
74 ~UpdateSuspendScope(); 74 ~UpdateSuspendScope();
75 75
76 private: 76 private:
77 void performDeferredWidgetTreeOperations(); 77 void performDeferredWidgetTreeOperations();
78 }; 78 };
79 79
80 virtual SandboxFlags sandboxFlags() const override;
81
80 virtual void trace(Visitor*) override; 82 virtual void trace(Visitor*) override;
81 83
82 protected: 84 protected:
83 HTMLFrameOwnerElement(const QualifiedName& tagName, Document&); 85 HTMLFrameOwnerElement(const QualifiedName& tagName, Document&);
84 void setSandboxFlags(SandboxFlags); 86 void setSandboxFlags(SandboxFlags);
85 87
86 bool loadOrRedirectSubframe(const KURL&, const AtomicString& frameName, bool lockBackForwardList, ContentSecurityPolicyDisposition shouldCheckContentSecurit yPolicy); 88 bool loadOrRedirectSubframe(const KURL&, const AtomicString& frameName, bool lockBackForwardList, ContentSecurityPolicyDisposition shouldCheckContentSecurit yPolicy);
87 89
88 private: 90 private:
89 virtual bool isKeyboardFocusable() const override; 91 virtual bool isKeyboardFocusable() const override;
90 virtual bool isFrameOwnerElement() const override final { return true; } 92 virtual bool isFrameOwnerElement() const override final { return true; }
91 93
92 // FrameOwner overrides: 94 // FrameOwner overrides:
93 virtual bool isLocal() const { return true; } 95 virtual bool isLocal() const { return true; }
94 virtual SandboxFlags sandboxFlags() const override;
95 virtual void dispatchLoad() override; 96 virtual void dispatchLoad() override;
dcheng 2015/01/21 23:19:06 I think we should move this entire block to public
alexmos 2015/01/22 00:37:58 Done. Nate, are you ok with this?
Nate Chapin 2015/01/22 19:00:27 Yeah, that's a good argument.
96 97
97 RawPtrWillBeMember<Frame> m_contentFrame; 98 RawPtrWillBeMember<Frame> m_contentFrame;
98 RefPtrWillBeMember<Widget> m_widget; 99 RefPtrWillBeMember<Widget> m_widget;
99 SandboxFlags m_sandboxFlags; 100 SandboxFlags m_sandboxFlags;
100 }; 101 };
101 102
102 DEFINE_ELEMENT_TYPE_CASTS(HTMLFrameOwnerElement, isFrameOwnerElement()); 103 DEFINE_ELEMENT_TYPE_CASTS(HTMLFrameOwnerElement, isFrameOwnerElement());
103 104
104 class SubframeLoadingDisabler { 105 class SubframeLoadingDisabler {
105 STACK_ALLOCATED(); 106 STACK_ALLOCATED();
(...skipping 24 matching lines...) Expand all
130 static WillBeHeapHashCountedSet<RawPtrWillBeMember<Node>>& disabledSubtreeRo ots(); 131 static WillBeHeapHashCountedSet<RawPtrWillBeMember<Node>>& disabledSubtreeRo ots();
131 132
132 RawPtrWillBeMember<Node> m_root; 133 RawPtrWillBeMember<Node> m_root;
133 }; 134 };
134 135
135 DEFINE_TYPE_CASTS(HTMLFrameOwnerElement, FrameOwner, owner, owner->isLocal(), ow ner.isLocal()); 136 DEFINE_TYPE_CASTS(HTMLFrameOwnerElement, FrameOwner, owner, owner->isLocal(), ow ner.isLocal());
136 137
137 } // namespace blink 138 } // namespace blink
138 139
139 #endif // HTMLFrameOwnerElement_h 140 #endif // HTMLFrameOwnerElement_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/loader/FrameLoader.cpp » ('j') | Source/web/WebRemoteFrameImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698