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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameOwner.h

Issue 2733823004: Remove old permission delegation prototype (Closed)
Patch Set: update webexposed layout tests Created 3 years, 9 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 | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/html/BUILD.gn » ('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 FrameOwner_h 5 #ifndef FrameOwner_h
6 #define FrameOwner_h 6 #define FrameOwner_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/dom/SandboxFlags.h" 9 #include "core/dom/SandboxFlags.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
11 #include "platform/scroll/ScrollTypes.h" 11 #include "platform/scroll/ScrollTypes.h"
12 #include "public/platform/WebFeaturePolicy.h" 12 #include "public/platform/WebFeaturePolicy.h"
13 #include "public/platform/WebVector.h" 13 #include "public/platform/WebVector.h"
14 #include "public/platform/modules/permissions/permission.mojom-blink.h"
15 14
16 namespace blink { 15 namespace blink {
17 16
18 class Frame; 17 class Frame;
19 18
20 // Oilpan: all FrameOwner instances are GCed objects. FrameOwner additionally 19 // Oilpan: all FrameOwner instances are GCed objects. FrameOwner additionally
21 // derives from GarbageCollectedMixin so that Member<FrameOwner> references can 20 // derives from GarbageCollectedMixin so that Member<FrameOwner> references can
22 // be kept (e.g., Frame::m_owner.) 21 // be kept (e.g., Frame::m_owner.)
23 class CORE_EXPORT FrameOwner : public GarbageCollectedMixin { 22 class CORE_EXPORT FrameOwner : public GarbageCollectedMixin {
24 public: 23 public:
(...skipping 18 matching lines...) Expand all
43 // Returns the 'name' content attribute value of the browsing context 42 // Returns the 'name' content attribute value of the browsing context
44 // container. 43 // container.
45 // https://html.spec.whatwg.org/multipage/browsers.html#browsing-context-conta iner 44 // https://html.spec.whatwg.org/multipage/browsers.html#browsing-context-conta iner
46 virtual AtomicString browsingContextContainerName() const = 0; 45 virtual AtomicString browsingContextContainerName() const = 0;
47 virtual ScrollbarMode scrollingMode() const = 0; 46 virtual ScrollbarMode scrollingMode() const = 0;
48 virtual int marginWidth() const = 0; 47 virtual int marginWidth() const = 0;
49 virtual int marginHeight() const = 0; 48 virtual int marginHeight() const = 0;
50 virtual bool allowFullscreen() const = 0; 49 virtual bool allowFullscreen() const = 0;
51 virtual bool allowPaymentRequest() const = 0; 50 virtual bool allowPaymentRequest() const = 0;
52 virtual AtomicString csp() const = 0; 51 virtual AtomicString csp() const = 0;
53 virtual const WebVector<mojom::blink::PermissionName>& delegatedPermissions()
54 const = 0;
55 virtual const WebVector<WebFeaturePolicyFeature>& allowedFeatures() const = 0; 52 virtual const WebVector<WebFeaturePolicyFeature>& allowedFeatures() const = 0;
56 }; 53 };
57 54
58 // TODO(dcheng): This class is an internal implementation detail of provisional 55 // TODO(dcheng): This class is an internal implementation detail of provisional
59 // frames. Move this into WebLocalFrameImpl.cpp and remove existing dependencies 56 // frames. Move this into WebLocalFrameImpl.cpp and remove existing dependencies
60 // on it. 57 // on it.
61 class CORE_EXPORT DummyFrameOwner 58 class CORE_EXPORT DummyFrameOwner
62 : public GarbageCollectedFinalized<DummyFrameOwner>, 59 : public GarbageCollectedFinalized<DummyFrameOwner>,
63 public FrameOwner { 60 public FrameOwner {
64 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner); 61 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner);
(...skipping 13 matching lines...) Expand all
78 void renderFallbackContent() override {} 75 void renderFallbackContent() override {}
79 AtomicString browsingContextContainerName() const override { 76 AtomicString browsingContextContainerName() const override {
80 return AtomicString(); 77 return AtomicString();
81 } 78 }
82 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; } 79 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; }
83 int marginWidth() const override { return -1; } 80 int marginWidth() const override { return -1; }
84 int marginHeight() const override { return -1; } 81 int marginHeight() const override { return -1; }
85 bool allowFullscreen() const override { return false; } 82 bool allowFullscreen() const override { return false; }
86 bool allowPaymentRequest() const override { return false; } 83 bool allowPaymentRequest() const override { return false; }
87 AtomicString csp() const override { return nullAtom; } 84 AtomicString csp() const override { return nullAtom; }
88 const WebVector<mojom::blink::PermissionName>& delegatedPermissions()
89 const override {
90 DEFINE_STATIC_LOCAL(WebVector<mojom::blink::PermissionName>, permissions,
91 ());
92 return permissions;
93 }
94 const WebVector<WebFeaturePolicyFeature>& allowedFeatures() const override { 85 const WebVector<WebFeaturePolicyFeature>& allowedFeatures() const override {
95 DEFINE_STATIC_LOCAL(WebVector<WebFeaturePolicyFeature>, features, ()); 86 DEFINE_STATIC_LOCAL(WebVector<WebFeaturePolicyFeature>, features, ());
96 return features; 87 return features;
97 } 88 }
98 89
99 private: 90 private:
100 // Intentionally private to prevent redundant checks when the type is 91 // Intentionally private to prevent redundant checks when the type is
101 // already DummyFrameOwner. 92 // already DummyFrameOwner.
102 bool isLocal() const override { return false; } 93 bool isLocal() const override { return false; }
103 bool isRemote() const override { return false; } 94 bool isRemote() const override { return false; }
104 }; 95 };
105 96
106 } // namespace blink 97 } // namespace blink
107 98
108 #endif // FrameOwner_h 99 #endif // FrameOwner_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/html/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698