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

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

Issue 2682953002: Make delegated permissions use mojo generated -permissions. (Closed)
Patch Set: fix nit 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 30 matching lines...) Expand all
41 41
42 AtomicString browsingContextContainerName() const override { 42 AtomicString browsingContextContainerName() const override {
43 return m_browsingContextContainerName; 43 return m_browsingContextContainerName;
44 } 44 }
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<WebPermissionType>& delegatedPermissions() const override { 51 const WebVector<mojom::blink::PermissionName>& delegatedPermissions()
52 const override {
52 return m_delegatedPermissions; 53 return m_delegatedPermissions;
53 } 54 }
54 55
55 void setBrowsingContextContainerName(const WebString& name) { 56 void setBrowsingContextContainerName(const WebString& name) {
56 m_browsingContextContainerName = name; 57 m_browsingContextContainerName = name;
57 } 58 }
58 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode); 59 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode);
59 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; } 60 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; }
60 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; } 61 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; }
61 void setAllowFullscreen(bool allowFullscreen) { 62 void setAllowFullscreen(bool allowFullscreen) {
62 m_allowFullscreen = allowFullscreen; 63 m_allowFullscreen = allowFullscreen;
63 } 64 }
64 void setAllowPaymentRequest(bool allowPaymentRequest) { 65 void setAllowPaymentRequest(bool allowPaymentRequest) {
65 m_allowPaymentRequest = allowPaymentRequest; 66 m_allowPaymentRequest = allowPaymentRequest;
66 } 67 }
67 void setCsp(const WebString& csp) { m_csp = csp; } 68 void setCsp(const WebString& csp) { m_csp = csp; }
68 void setDelegatedpermissions( 69 void setDelegatedpermissions(
69 const WebVector<WebPermissionType>& delegatedPermissions) { 70 const WebVector<mojom::blink::PermissionName>& delegatedPermissions) {
70 m_delegatedPermissions = delegatedPermissions; 71 m_delegatedPermissions = delegatedPermissions;
71 } 72 }
72 73
73 DECLARE_VIRTUAL_TRACE(); 74 DECLARE_VIRTUAL_TRACE();
74 75
75 private: 76 private:
76 RemoteFrameOwner(SandboxFlags, const WebFrameOwnerProperties&); 77 RemoteFrameOwner(SandboxFlags, const WebFrameOwnerProperties&);
77 78
78 // Intentionally private to prevent redundant checks when the type is 79 // Intentionally private to prevent redundant checks when the type is
79 // already HTMLFrameOwnerElement. 80 // already HTMLFrameOwnerElement.
80 bool isLocal() const override { return false; } 81 bool isLocal() const override { return false; }
81 bool isRemote() const override { return true; } 82 bool isRemote() const override { return true; }
82 83
83 Member<Frame> m_frame; 84 Member<Frame> m_frame;
84 SandboxFlags m_sandboxFlags; 85 SandboxFlags m_sandboxFlags;
85 AtomicString m_browsingContextContainerName; 86 AtomicString m_browsingContextContainerName;
86 ScrollbarMode m_scrolling; 87 ScrollbarMode m_scrolling;
87 int m_marginWidth; 88 int m_marginWidth;
88 int m_marginHeight; 89 int m_marginHeight;
89 bool m_allowFullscreen; 90 bool m_allowFullscreen;
90 bool m_allowPaymentRequest; 91 bool m_allowPaymentRequest;
91 WebString m_csp; 92 WebString m_csp;
92 WebVector<WebPermissionType> m_delegatedPermissions; 93 WebVector<mojom::blink::PermissionName> m_delegatedPermissions;
93 }; 94 };
94 95
95 DEFINE_TYPE_CASTS(RemoteFrameOwner, 96 DEFINE_TYPE_CASTS(RemoteFrameOwner,
96 FrameOwner, 97 FrameOwner,
97 owner, 98 owner,
98 owner->isRemote(), 99 owner->isRemote(),
99 owner.isRemote()); 100 owner.isRemote());
100 101
101 } // namespace blink 102 } // namespace blink
102 103
103 #endif // RemoteFrameOwner_h 104 #endif // RemoteFrameOwner_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/permissions/PermissionStatus.h ('k') | third_party/WebKit/public/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698