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

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

Issue 2378643002: Propagating csp attribute changes on frameOwnerPropertiesChanged() (Closed)
Patch Set: rebasing on master Created 4 years, 2 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 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 23 matching lines...) Expand all
34 virtual void dispatchLoad() = 0; 34 virtual void dispatchLoad() = 0;
35 35
36 // On load failure, a frame can ask its owner to render fallback content 36 // On load failure, a frame can ask its owner to render fallback content
37 // which replaces the frame contents. 37 // which replaces the frame contents.
38 virtual void renderFallbackContent() = 0; 38 virtual void renderFallbackContent() = 0;
39 39
40 virtual ScrollbarMode scrollingMode() const = 0; 40 virtual ScrollbarMode scrollingMode() const = 0;
41 virtual int marginWidth() const = 0; 41 virtual int marginWidth() const = 0;
42 virtual int marginHeight() const = 0; 42 virtual int marginHeight() const = 0;
43 virtual bool allowFullscreen() const = 0; 43 virtual bool allowFullscreen() const = 0;
44 virtual AtomicString csp() const = 0;
44 virtual const WebVector<WebPermissionType>& delegatedPermissions() const = 0; 45 virtual const WebVector<WebPermissionType>& delegatedPermissions() const = 0;
45 }; 46 };
46 47
47 class CORE_EXPORT DummyFrameOwner 48 class CORE_EXPORT DummyFrameOwner
48 : public GarbageCollectedFinalized<DummyFrameOwner>, 49 : public GarbageCollectedFinalized<DummyFrameOwner>,
49 public FrameOwner { 50 public FrameOwner {
50 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner); 51 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner);
51 52
52 public: 53 public:
53 static DummyFrameOwner* create() { return new DummyFrameOwner; } 54 static DummyFrameOwner* create() { return new DummyFrameOwner; }
54 55
55 DEFINE_INLINE_VIRTUAL_TRACE() { FrameOwner::trace(visitor); } 56 DEFINE_INLINE_VIRTUAL_TRACE() { FrameOwner::trace(visitor); }
56 57
57 // FrameOwner overrides: 58 // FrameOwner overrides:
58 void setContentFrame(Frame&) override {} 59 void setContentFrame(Frame&) override {}
59 void clearContentFrame() override {} 60 void clearContentFrame() override {}
60 SandboxFlags getSandboxFlags() const override { return SandboxNone; } 61 SandboxFlags getSandboxFlags() const override { return SandboxNone; }
61 void dispatchLoad() override {} 62 void dispatchLoad() override {}
62 void renderFallbackContent() override {} 63 void renderFallbackContent() override {}
63 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; } 64 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; }
64 int marginWidth() const override { return -1; } 65 int marginWidth() const override { return -1; }
65 int marginHeight() const override { return -1; } 66 int marginHeight() const override { return -1; }
66 bool allowFullscreen() const override { return false; } 67 bool allowFullscreen() const override { return false; }
68 AtomicString csp() const override { return nullAtom; }
67 const WebVector<WebPermissionType>& delegatedPermissions() const override { 69 const WebVector<WebPermissionType>& delegatedPermissions() const override {
68 DEFINE_STATIC_LOCAL(WebVector<WebPermissionType>, permissions, ()); 70 DEFINE_STATIC_LOCAL(WebVector<WebPermissionType>, permissions, ());
69 return permissions; 71 return permissions;
70 } 72 }
71 73
72 private: 74 private:
73 // Intentionally private to prevent redundant checks when the type is 75 // Intentionally private to prevent redundant checks when the type is
74 // already DummyFrameOwner. 76 // already DummyFrameOwner.
75 bool isLocal() const override { return false; } 77 bool isLocal() const override { return false; }
76 bool isRemote() const override { return false; } 78 bool isRemote() const override { return false; }
77 }; 79 };
78 80
79 } // namespace blink 81 } // namespace blink
80 82
81 #endif // FrameOwner_h 83 #endif // FrameOwner_h
OLDNEW
« no previous file with comments | « content/test/data/frame_owner_properties_csp.html ('k') | third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698