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

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

Issue 2015003002: Disallow local/remote checks on subclasses of Frame, FrameOwner and DOMWindow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pure virtual Created 4 years, 6 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner); 45 USING_GARBAGE_COLLECTED_MIXIN(DummyFrameOwner);
46 public: 46 public:
47 static DummyFrameOwner* create() 47 static DummyFrameOwner* create()
48 { 48 {
49 return new DummyFrameOwner; 49 return new DummyFrameOwner;
50 } 50 }
51 51
52 DEFINE_INLINE_VIRTUAL_TRACE() { FrameOwner::trace(visitor); } 52 DEFINE_INLINE_VIRTUAL_TRACE() { FrameOwner::trace(visitor); }
53 53
54 // FrameOwner overrides: 54 // FrameOwner overrides:
55 bool isLocal() const override { return false; }
56 bool isRemote() const override { return false; }
57 void setContentFrame(Frame&) override { } 55 void setContentFrame(Frame&) override { }
58 void clearContentFrame() override { } 56 void clearContentFrame() override { }
59 SandboxFlags getSandboxFlags() const override { return SandboxNone; } 57 SandboxFlags getSandboxFlags() const override { return SandboxNone; }
60 void dispatchLoad() override { } 58 void dispatchLoad() override { }
61 void renderFallbackContent() override { } 59 void renderFallbackContent() override { }
62 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; } 60 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; }
63 int marginWidth() const override { return -1; } 61 int marginWidth() const override { return -1; }
64 int marginHeight() const override { return -1; } 62 int marginHeight() const override { return -1; }
65 bool allowFullscreen() const override { return false; } 63 bool allowFullscreen() const override { return false; }
64
65 private:
66 // Intentionally private to prevent redundant checks when the type is
67 // already DummyFrameOwner.
68 bool isLocal() const override { return false; }
69 bool isRemote() const override { return false; }
66 }; 70 };
67 71
68 } // namespace blink 72 } // namespace blink
69 73
70 #endif // FrameOwner_h 74 #endif // FrameOwner_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.h ('k') | third_party/WebKit/Source/core/frame/LocalDOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698