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

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

Issue 2331223002: Added allowvr attribute to iframes and vrEnabled to Document (Closed)
Patch Set: Rebase and moved vrEnabled from navigator to document Created 4 years, 3 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 bool allowVR() 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 : public GarbageCollectedFinalized<DummyFrameO wner>, public FrameOwner { 48 class CORE_EXPORT DummyFrameOwner : public GarbageCollectedFinalized<DummyFrameO wner>, public FrameOwner {
48 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner); 49 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner);
49 public: 50 public:
50 static DummyFrameOwner* create() 51 static DummyFrameOwner* create()
51 { 52 {
52 return new DummyFrameOwner; 53 return new DummyFrameOwner;
53 } 54 }
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 bool allowVR() const override { return false; }
67 const WebVector<WebPermissionType>& delegatedPermissions() const override 69 const WebVector<WebPermissionType>& delegatedPermissions() const override
68 { 70 {
69 DEFINE_STATIC_LOCAL(WebVector<WebPermissionType>, permissions, ()); 71 DEFINE_STATIC_LOCAL(WebVector<WebPermissionType>, permissions, ());
70 return permissions; 72 return permissions;
71 } 73 }
72 74
73 private: 75 private:
74 // Intentionally private to prevent redundant checks when the type is 76 // Intentionally private to prevent redundant checks when the type is
75 // already DummyFrameOwner. 77 // already DummyFrameOwner.
76 bool isLocal() const override { return false; } 78 bool isLocal() const override { return false; }
77 bool isRemote() const override { return false; } 79 bool isRemote() const override { return false; }
78 }; 80 };
79 81
80 } // namespace blink 82 } // namespace blink
81 83
82 #endif // FrameOwner_h 84 #endif // FrameOwner_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698