| OLD | NEW |
| 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" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // 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 |
| 45 virtual AtomicString BrowsingContextContainerName() const = 0; | 45 virtual AtomicString BrowsingContextContainerName() const = 0; |
| 46 virtual ScrollbarMode ScrollingMode() const = 0; | 46 virtual ScrollbarMode ScrollingMode() const = 0; |
| 47 virtual int MarginWidth() const = 0; | 47 virtual int MarginWidth() const = 0; |
| 48 virtual int MarginHeight() const = 0; | 48 virtual int MarginHeight() const = 0; |
| 49 virtual bool AllowFullscreen() const = 0; | 49 virtual bool AllowFullscreen() const = 0; |
| 50 virtual bool AllowPaymentRequest() const = 0; | 50 virtual bool AllowPaymentRequest() const = 0; |
| 51 virtual bool IsDisplayNone() const = 0; | 51 virtual bool IsDisplayNone() const = 0; |
| 52 virtual AtomicString Csp() const = 0; | 52 virtual AtomicString Csp() const = 0; |
| 53 virtual const WebVector<WebFeaturePolicyFeature>& AllowedFeatures() const = 0; | 53 virtual const WebVector<WebFeaturePolicyFeature>& AllowedFeatures() const = 0; |
| 54 virtual const WebParsedFeaturePolicy& ContainerPolicy() const = 0; |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 // TODO(dcheng): This class is an internal implementation detail of provisional | 57 // TODO(dcheng): This class is an internal implementation detail of provisional |
| 57 // frames. Move this into WebLocalFrameImpl.cpp and remove existing dependencies | 58 // frames. Move this into WebLocalFrameImpl.cpp and remove existing dependencies |
| 58 // on it. | 59 // on it. |
| 59 class CORE_EXPORT DummyFrameOwner | 60 class CORE_EXPORT DummyFrameOwner |
| 60 : public GarbageCollectedFinalized<DummyFrameOwner>, | 61 : public GarbageCollectedFinalized<DummyFrameOwner>, |
| 61 public FrameOwner { | 62 public FrameOwner { |
| 62 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner); | 63 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner); |
| 63 | 64 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 81 int MarginWidth() const override { return -1; } | 82 int MarginWidth() const override { return -1; } |
| 82 int MarginHeight() const override { return -1; } | 83 int MarginHeight() const override { return -1; } |
| 83 bool AllowFullscreen() const override { return false; } | 84 bool AllowFullscreen() const override { return false; } |
| 84 bool AllowPaymentRequest() const override { return false; } | 85 bool AllowPaymentRequest() const override { return false; } |
| 85 bool IsDisplayNone() const override { return false; } | 86 bool IsDisplayNone() const override { return false; } |
| 86 AtomicString Csp() const override { return g_null_atom; } | 87 AtomicString Csp() const override { return g_null_atom; } |
| 87 const WebVector<WebFeaturePolicyFeature>& AllowedFeatures() const override { | 88 const WebVector<WebFeaturePolicyFeature>& AllowedFeatures() const override { |
| 88 DEFINE_STATIC_LOCAL(WebVector<WebFeaturePolicyFeature>, features, ()); | 89 DEFINE_STATIC_LOCAL(WebVector<WebFeaturePolicyFeature>, features, ()); |
| 89 return features; | 90 return features; |
| 90 } | 91 } |
| 92 const WebParsedFeaturePolicy& ContainerPolicy() const override { |
| 93 DEFINE_STATIC_LOCAL(WebParsedFeaturePolicy, container_policy, ()); |
| 94 return container_policy; |
| 95 } |
| 91 | 96 |
| 92 private: | 97 private: |
| 93 // Intentionally private to prevent redundant checks when the type is | 98 // Intentionally private to prevent redundant checks when the type is |
| 94 // already DummyFrameOwner. | 99 // already DummyFrameOwner. |
| 95 bool IsLocal() const override { return false; } | 100 bool IsLocal() const override { return false; } |
| 96 bool IsRemote() const override { return false; } | 101 bool IsRemote() const override { return false; } |
| 97 }; | 102 }; |
| 98 | 103 |
| 99 } // namespace blink | 104 } // namespace blink |
| 100 | 105 |
| 101 #endif // FrameOwner_h | 106 #endif // FrameOwner_h |
| OLD | NEW |