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

Side by Side Diff: third_party/WebKit/Source/web/RemoteFrameOwner.h

Issue 2697713003: Initial Implementation of Iframe Attribute for Feature Policy (Part 2) (Closed)
Patch Set: Update rebase Created 3 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be found 2 // Use of this source code is governed by a BSD-style license that can be found
3 // in the LICENSE file. 3 // in the LICENSE file.
4 4
5 #ifndef RemoteFrameOwner_h 5 #ifndef RemoteFrameOwner_h
6 #define RemoteFrameOwner_h 6 #define RemoteFrameOwner_h
7 7
8 #include "core/frame/FrameOwner.h" 8 #include "core/frame/FrameOwner.h"
9 #include "platform/scroll/ScrollTypes.h" 9 #include "platform/scroll/ScrollTypes.h"
10 #include "public/web/WebFrameOwnerProperties.h" 10 #include "public/web/WebFrameOwnerProperties.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 ScrollbarMode scrollingMode() const override { return m_scrolling; } 45 ScrollbarMode scrollingMode() const override { return m_scrolling; }
46 int marginWidth() const override { return m_marginWidth; } 46 int marginWidth() const override { return m_marginWidth; }
47 int marginHeight() const override { return m_marginHeight; } 47 int marginHeight() const override { return m_marginHeight; }
48 bool allowFullscreen() const override { return m_allowFullscreen; } 48 bool allowFullscreen() const override { return m_allowFullscreen; }
49 bool allowPaymentRequest() const override { return m_allowPaymentRequest; } 49 bool allowPaymentRequest() const override { return m_allowPaymentRequest; }
50 AtomicString csp() const override { return m_csp; } 50 AtomicString csp() const override { return m_csp; }
51 const WebVector<mojom::blink::PermissionName>& delegatedPermissions() 51 const WebVector<mojom::blink::PermissionName>& delegatedPermissions()
52 const override { 52 const override {
53 return m_delegatedPermissions; 53 return m_delegatedPermissions;
54 } 54 }
55 const WebVector<WebFeaturePolicyFeature>& allowedFeatures() const override {
56 return m_allowedFeatures;
57 }
55 58
56 void setBrowsingContextContainerName(const WebString& name) { 59 void setBrowsingContextContainerName(const WebString& name) {
57 m_browsingContextContainerName = name; 60 m_browsingContextContainerName = name;
58 } 61 }
59 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode); 62 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode);
60 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; } 63 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; }
61 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; } 64 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; }
62 void setAllowFullscreen(bool allowFullscreen) { 65 void setAllowFullscreen(bool allowFullscreen) {
63 m_allowFullscreen = allowFullscreen; 66 m_allowFullscreen = allowFullscreen;
64 } 67 }
65 void setAllowPaymentRequest(bool allowPaymentRequest) { 68 void setAllowPaymentRequest(bool allowPaymentRequest) {
66 m_allowPaymentRequest = allowPaymentRequest; 69 m_allowPaymentRequest = allowPaymentRequest;
67 } 70 }
68 void setCsp(const WebString& csp) { m_csp = csp; } 71 void setCsp(const WebString& csp) { m_csp = csp; }
69 void setDelegatedpermissions( 72 void setDelegatedpermissions(
70 const WebVector<mojom::blink::PermissionName>& delegatedPermissions) { 73 const WebVector<mojom::blink::PermissionName>& delegatedPermissions) {
71 m_delegatedPermissions = delegatedPermissions; 74 m_delegatedPermissions = delegatedPermissions;
72 } 75 }
76 void setAllowedFeatures(
77 const WebVector<WebFeaturePolicyFeature>& allowedFeatures) {
78 m_allowedFeatures = allowedFeatures;
79 }
73 80
74 DECLARE_VIRTUAL_TRACE(); 81 DECLARE_VIRTUAL_TRACE();
75 82
76 private: 83 private:
77 RemoteFrameOwner(SandboxFlags, const WebFrameOwnerProperties&); 84 RemoteFrameOwner(SandboxFlags, const WebFrameOwnerProperties&);
78 85
79 // Intentionally private to prevent redundant checks when the type is 86 // Intentionally private to prevent redundant checks when the type is
80 // already HTMLFrameOwnerElement. 87 // already HTMLFrameOwnerElement.
81 bool isLocal() const override { return false; } 88 bool isLocal() const override { return false; }
82 bool isRemote() const override { return true; } 89 bool isRemote() const override { return true; }
83 90
84 Member<Frame> m_frame; 91 Member<Frame> m_frame;
85 SandboxFlags m_sandboxFlags; 92 SandboxFlags m_sandboxFlags;
86 AtomicString m_browsingContextContainerName; 93 AtomicString m_browsingContextContainerName;
87 ScrollbarMode m_scrolling; 94 ScrollbarMode m_scrolling;
88 int m_marginWidth; 95 int m_marginWidth;
89 int m_marginHeight; 96 int m_marginHeight;
90 bool m_allowFullscreen; 97 bool m_allowFullscreen;
91 bool m_allowPaymentRequest; 98 bool m_allowPaymentRequest;
92 WebString m_csp; 99 WebString m_csp;
93 WebVector<mojom::blink::PermissionName> m_delegatedPermissions; 100 WebVector<mojom::blink::PermissionName> m_delegatedPermissions;
101 WebVector<WebFeaturePolicyFeature> m_allowedFeatures;
94 }; 102 };
95 103
96 DEFINE_TYPE_CASTS(RemoteFrameOwner, 104 DEFINE_TYPE_CASTS(RemoteFrameOwner,
97 FrameOwner, 105 FrameOwner,
98 owner, 106 owner,
99 owner->isRemote(), 107 owner->isRemote(),
100 owner.isRemote()); 108 owner.isRemote());
101 109
102 } // namespace blink 110 } // namespace blink
103 111
104 #endif // RemoteFrameOwner_h 112 #endif // RemoteFrameOwner_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp ('k') | third_party/WebKit/Source/web/WebFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698