| OLD | NEW |
| 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 WebRemoteFrameImpl_h | 5 #ifndef WebRemoteFrameImpl_h |
| 6 #define WebRemoteFrameImpl_h | 6 #define WebRemoteFrameImpl_h |
| 7 | 7 |
| 8 #include "core/frame/FrameOwner.h" | 8 #include "core/frame/FrameOwner.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "public/web/WebRemoteFrame.h" | 10 #include "public/web/WebRemoteFrame.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 private: | 195 private: |
| 196 WebRemoteFrameImpl(WebTreeScopeType, WebRemoteFrameClient*); | 196 WebRemoteFrameImpl(WebTreeScopeType, WebRemoteFrameClient*); |
| 197 | 197 |
| 198 RemoteFrameClientImpl m_frameClient; | 198 RemoteFrameClientImpl m_frameClient; |
| 199 RefPtrWillBeMember<RemoteFrame> m_frame; | 199 RefPtrWillBeMember<RemoteFrame> m_frame; |
| 200 WebRemoteFrameClient* m_client; | 200 WebRemoteFrameClient* m_client; |
| 201 | 201 |
| 202 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>> m_ownersForChil
dren; | 202 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>> m_ownersForChil
dren; |
| 203 | 203 |
| 204 #if ENABLE(OILPAN) | 204 #if ENABLE(OILPAN) |
| 205 // Oilpan: to provide the guarantee of having the frame live until | 205 // Oilpan: WebRemoteFrameImpl must remain alive until close() is called. |
| 206 // close() is called, an instance keep a self-persistent. It is | 206 // Accomplish that by keeping a self-referential Persistent<>. It is |
| 207 // cleared upon calling close(). This avoids having to assume that | 207 // cleared upon close(). |
| 208 // an embedder's WebFrame references are all discovered via thread | 208 SelfKeepAlive<WebRemoteFrameImpl> m_selfKeepAlive; |
| 209 // state (stack, registers) should an Oilpan GC strike while we're | |
| 210 // in the process of detaching. | |
| 211 GC_PLUGIN_IGNORE("340522") | |
| 212 Persistent<WebRemoteFrameImpl> m_selfKeepAlive; | |
| 213 #endif | 209 #endif |
| 214 }; | 210 }; |
| 215 | 211 |
| 216 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); | 212 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); |
| 217 | 213 |
| 218 } // namespace blink | 214 } // namespace blink |
| 219 | 215 |
| 220 #endif // WebRemoteFrameImpl_h | 216 #endif // WebRemoteFrameImpl_h |
| OLD | NEW |