| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 void setCoreFrame(PassRefPtrWillBeRawPtr<RemoteFrame>); | 192 void setCoreFrame(PassRefPtrWillBeRawPtr<RemoteFrame>); |
| 193 RemoteFrame* frame() const { return m_frame.get(); } | 193 RemoteFrame* frame() const { return m_frame.get(); } |
| 194 | 194 |
| 195 WebRemoteFrameClient* client() const { return m_client; } | 195 WebRemoteFrameClient* client() const { return m_client; } |
| 196 | 196 |
| 197 static WebRemoteFrameImpl* fromFrame(RemoteFrame&); | 197 static WebRemoteFrameImpl* fromFrame(RemoteFrame&); |
| 198 | 198 |
| 199 virtual void initializeFromFrame(WebLocalFrame*) const override; | 199 virtual void initializeFromFrame(WebLocalFrame*) const override; |
| 200 | 200 |
| 201 virtual void setReplicatedOrigin(const WebSecurityOrigin&) const override; |
| 202 |
| 201 #if ENABLE(OILPAN) | 203 #if ENABLE(OILPAN) |
| 202 void trace(Visitor*); | 204 void trace(Visitor*); |
| 203 #endif | 205 #endif |
| 204 | 206 |
| 205 private: | 207 private: |
| 206 RemoteFrameClientImpl m_frameClient; | 208 RemoteFrameClientImpl m_frameClient; |
| 207 RefPtrWillBeMember<RemoteFrame> m_frame; | 209 RefPtrWillBeMember<RemoteFrame> m_frame; |
| 208 WebRemoteFrameClient* m_client; | 210 WebRemoteFrameClient* m_client; |
| 209 | 211 |
| 210 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner> > m_ownersForChi
ldren; | 212 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner> > m_ownersForChi
ldren; |
| 211 | 213 |
| 212 #if ENABLE(OILPAN) | 214 #if ENABLE(OILPAN) |
| 213 // Oilpan: to provide the guarantee of having the frame live until | 215 // Oilpan: to provide the guarantee of having the frame live until |
| 214 // close() is called, an instance keep a self-persistent. It is | 216 // close() is called, an instance keep a self-persistent. It is |
| 215 // cleared upon calling close(). This avoids having to assume that | 217 // cleared upon calling close(). This avoids having to assume that |
| 216 // an embedder's WebFrame references are all discovered via thread | 218 // an embedder's WebFrame references are all discovered via thread |
| 217 // state (stack, registers) should an Oilpan GC strike while we're | 219 // state (stack, registers) should an Oilpan GC strike while we're |
| 218 // in the process of detaching. | 220 // in the process of detaching. |
| 219 GC_PLUGIN_IGNORE("340522") | 221 GC_PLUGIN_IGNORE("340522") |
| 220 Persistent<WebRemoteFrameImpl> m_selfKeepAlive; | 222 Persistent<WebRemoteFrameImpl> m_selfKeepAlive; |
| 221 #endif | 223 #endif |
| 222 }; | 224 }; |
| 223 | 225 |
| 224 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); | 226 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); |
| 225 | 227 |
| 226 } // namespace blink | 228 } // namespace blink |
| 227 | 229 |
| 228 #endif // WebRemoteFrameImpl_h | 230 #endif // WebRemoteFrameImpl_h |
| OLD | NEW |