| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be found | 2 // Use of this source code is governed by a BSD-style license that can be found |
| 3 // in the LICENSE file. | 3 // in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef RemoteFrameOwner_h | 5 #ifndef RemoteFrameOwner_h |
| 6 #define RemoteFrameOwner_h | 6 #define RemoteFrameOwner_h |
| 7 | 7 |
| 8 #include "core/frame/FrameOwner.h" | 8 #include "core/frame/FrameOwner.h" |
| 9 #include "platform/scroll/ScrollTypes.h" | 9 #include "platform/scroll/ScrollTypes.h" |
| 10 #include "public/web/WebFrameOwnerProperties.h" | 10 #include "public/web/WebFrameOwnerProperties.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 // Helper class to bridge communication for a frame with a remote parent. | 14 // Helper class to bridge communication for a frame with a remote parent. |
| 15 // Currently, it serves two purposes: | 15 // Currently, it serves two purposes: |
| 16 // 1. Allows the local frame's loader to retrieve sandbox flags associated with | 16 // 1. Allows the local frame's loader to retrieve sandbox flags associated with |
| 17 // its owner element in another process. | 17 // its owner element in another process. |
| 18 // 2. Trigger a load event on its owner element once it finishes a load. | 18 // 2. Trigger a load event on its owner element once it finishes a load. |
| 19 class RemoteFrameOwner final : public GarbageCollectedFinalized<RemoteFrameOwner
>, public FrameOwner { | 19 class RemoteFrameOwner final : public GarbageCollectedFinalized<RemoteFrameOwner
>, public FrameOwner { |
| 20 USING_GARBAGE_COLLECTED_MIXIN(RemoteFrameOwner); | 20 USING_GARBAGE_COLLECTED_MIXIN(RemoteFrameOwner); |
| 21 public: | 21 public: |
| 22 static RawPtr<RemoteFrameOwner> create(SandboxFlags flags, const WebFrameOwn
erProperties& frameOwnerProperties) | 22 static RemoteFrameOwner* create(SandboxFlags flags, const WebFrameOwnerPrope
rties& frameOwnerProperties) |
| 23 { | 23 { |
| 24 return new RemoteFrameOwner(flags, frameOwnerProperties); | 24 return new RemoteFrameOwner(flags, frameOwnerProperties); |
| 25 } | 25 } |
| 26 | 26 |
| 27 // FrameOwner overrides: | 27 // FrameOwner overrides: |
| 28 bool isLocal() const override { return false; } | 28 bool isLocal() const override { return false; } |
| 29 bool isRemote() const override { return true; } | 29 bool isRemote() const override { return true; } |
| 30 void setContentFrame(Frame&) override; | 30 void setContentFrame(Frame&) override; |
| 31 void clearContentFrame() override; | 31 void clearContentFrame() override; |
| 32 SandboxFlags getSandboxFlags() const override { return m_sandboxFlags; } | 32 SandboxFlags getSandboxFlags() const override { return m_sandboxFlags; } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 52 ScrollbarMode m_scrolling; | 52 ScrollbarMode m_scrolling; |
| 53 int m_marginWidth; | 53 int m_marginWidth; |
| 54 int m_marginHeight; | 54 int m_marginHeight; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 DEFINE_TYPE_CASTS(RemoteFrameOwner, FrameOwner, owner, owner->isRemote(), owner.
isRemote()); | 57 DEFINE_TYPE_CASTS(RemoteFrameOwner, FrameOwner, owner, owner->isRemote(), owner.
isRemote()); |
| 58 | 58 |
| 59 } // namespace blink | 59 } // namespace blink |
| 60 | 60 |
| 61 #endif // RemoteFrameOwner_h | 61 #endif // RemoteFrameOwner_h |
| OLD | NEW |