| 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 "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
| 9 #include "public/web/WebRemoteFrame.h" | 9 #include "public/web/WebRemoteFrame.h" |
| 10 #include "public/web/WebRemoteFrameClient.h" | 10 #include "public/web/WebRemoteFrameClient.h" |
| 11 #include "web/RemoteFrameClient.h" | 11 #include "web/RemoteFrameClientImpl.h" |
| 12 #include "wtf/HashMap.h" | 12 #include "wtf/HashMap.h" |
| 13 #include "wtf/OwnPtr.h" | 13 #include "wtf/OwnPtr.h" |
| 14 #include "wtf/RefCounted.h" | 14 #include "wtf/RefCounted.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 class FrameHost; | 18 class FrameHost; |
| 19 class FrameOwner; | 19 class FrameOwner; |
| 20 class RemoteFrame; | 20 class RemoteFrame; |
| 21 class WebViewImpl; | 21 class WebViewImpl; |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 WebRemoteFrameClient* client() const { return m_client; } | 182 WebRemoteFrameClient* client() const { return m_client; } |
| 183 | 183 |
| 184 static WebRemoteFrameImpl* fromFrame(RemoteFrame&); | 184 static WebRemoteFrameImpl* fromFrame(RemoteFrame&); |
| 185 | 185 |
| 186 virtual void initializeFromFrame(WebLocalFrame*) const OVERRIDE; | 186 virtual void initializeFromFrame(WebLocalFrame*) const OVERRIDE; |
| 187 | 187 |
| 188 virtual void trace(Visitor*); | 188 virtual void trace(Visitor*); |
| 189 | 189 |
| 190 private: | 190 private: |
| 191 RemoteFrameClient m_frameClient; | 191 RemoteFrameClientImpl m_frameClient; |
| 192 RefPtrWillBeMember<RemoteFrame> m_frame; | 192 RefPtrWillBeMember<RemoteFrame> m_frame; |
| 193 WebRemoteFrameClient* m_client; | 193 WebRemoteFrameClient* m_client; |
| 194 | 194 |
| 195 WebViewImpl* viewImpl() const; | 195 WebViewImpl* viewImpl() const; |
| 196 | 196 |
| 197 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner> > m_ownersForChi
ldren; | 197 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner> > m_ownersForChi
ldren; |
| 198 | 198 |
| 199 #if ENABLE(OILPAN) | 199 #if ENABLE(OILPAN) |
| 200 // Oilpan: to provide the guarantee of having the frame live until | 200 // Oilpan: to provide the guarantee of having the frame live until |
| 201 // close() is called, an instance keep a self-persistent. It is | 201 // close() is called, an instance keep a self-persistent. It is |
| 202 // cleared upon calling close(). This avoids having to assume that | 202 // cleared upon calling close(). This avoids having to assume that |
| 203 // an embedder's WebFrame references are all discovered via thread | 203 // an embedder's WebFrame references are all discovered via thread |
| 204 // state (stack, registers) should an Oilpan GC strike while we're | 204 // state (stack, registers) should an Oilpan GC strike while we're |
| 205 // in the process of detaching. | 205 // in the process of detaching. |
| 206 GC_PLUGIN_IGNORE("340522") | 206 GC_PLUGIN_IGNORE("340522") |
| 207 Persistent<WebRemoteFrameImpl> m_selfKeepAlive; | 207 Persistent<WebRemoteFrameImpl> m_selfKeepAlive; |
| 208 #endif | 208 #endif |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); | 211 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame()
, frame.isWebRemoteFrame()); |
| 212 | 212 |
| 213 } // namespace blink | 213 } // namespace blink |
| 214 | 214 |
| 215 #endif // WebRemoteFrameImpl_h | 215 #endif // WebRemoteFrameImpl_h |
| OLD | NEW |