Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // in the LICENSE file. | |
| 4 | |
| 5 #ifndef RemoteBridgeFrameOwner_h | |
| 6 #define RemoteBridgeFrameOwner_h | |
| 7 | |
| 8 #include "core/frame/FrameOwner.h" | |
| 9 #include "web/WebLocalFrameImpl.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 // Helper class to bridge communication for a frame with a remote parent. | |
| 14 // Currently, it serves two purposes: | |
| 15 // 1. Allows the local frame's loader to retrieve sandbox flags associated with | |
| 16 // its owner element in another process. | |
| 17 // 2. Trigger a load event on its owner element once it finishes a load. | |
| 18 class RemoteBridgeFrameOwner : public NoBaseWillBeGarbageCollectedFinalized<Remo teBridgeFrameOwner>, public FrameOwner { | |
| 19 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RemoteBridgeFrameOwner); | |
| 20 | |
|
dcheng
2015/02/11 22:45:04
Nit: no newline.
alexmos
2015/02/11 22:49:47
Done. I guess git cl format did the wrong thing?
| |
| 21 public: | |
| 22 static PassOwnPtrWillBeRawPtr<RemoteBridgeFrameOwner> create(PassRefPtrWillB eRawPtr<WebLocalFrameImpl> frame, SandboxFlags flags) | |
| 23 { | |
| 24 return adoptPtrWillBeNoop(new RemoteBridgeFrameOwner(frame, flags)); | |
| 25 } | |
| 26 | |
| 27 virtual bool isLocal() const override | |
| 28 { | |
| 29 return false; | |
| 30 } | |
| 31 | |
| 32 virtual SandboxFlags sandboxFlags() const override | |
| 33 { | |
| 34 return m_sandboxFlags; | |
| 35 } | |
| 36 | |
| 37 void setSandboxFlags(SandboxFlags flags) | |
| 38 { | |
| 39 m_sandboxFlags = flags; | |
| 40 } | |
| 41 | |
| 42 virtual void dispatchLoad() override; | |
| 43 | |
| 44 virtual void trace(Visitor*) override; | |
| 45 | |
| 46 private: | |
| 47 RemoteBridgeFrameOwner(PassRefPtrWillBeRawPtr<WebLocalFrameImpl>, SandboxFla gs); | |
| 48 | |
| 49 RefPtrWillBeMember<WebLocalFrameImpl> m_frame; | |
| 50 SandboxFlags m_sandboxFlags; | |
| 51 }; | |
| 52 | |
| 53 } // namespace blink | |
| 54 | |
| 55 #endif // RemoteBridgeFrameOwner_h | |
| OLD | NEW |