Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: Source/web/WebRemoteFrameImpl.h

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase past r181764 Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "public/web/WebRemoteFrame.h" 8 #include "public/web/WebRemoteFrame.h"
9 #include "web/RemoteFrameClient.h" 9 #include "web/RemoteFrameClient.h"
10 #include "wtf/HashMap.h" 10 #include "wtf/HashMap.h"
11 #include "wtf/OwnPtr.h" 11 #include "wtf/OwnPtr.h"
12 #include "wtf/RefCounted.h" 12 #include "wtf/RefCounted.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class FrameHost; 16 class FrameHost;
17 class FrameOwner; 17 class FrameOwner;
18 class RemoteFrame; 18 class RemoteFrame;
19 19
20 class WebRemoteFrameImpl : public WebRemoteFrame, public RefCounted<WebRemoteFra meImpl> { 20 class WebRemoteFrameImpl FINAL : public RefCountedWillBeGarbageCollectedFinalize d<WebRemoteFrameImpl>, public WebRemoteFrame {
21 public: 21 public:
22 WebRemoteFrameImpl(); 22 WebRemoteFrameImpl();
23 virtual ~WebRemoteFrameImpl(); 23 virtual ~WebRemoteFrameImpl();
24 24
25 // WebRemoteFrame methods. 25 // WebRemoteFrame methods.
26 virtual bool isWebLocalFrame() const OVERRIDE; 26 virtual bool isWebLocalFrame() const OVERRIDE;
27 virtual WebLocalFrame* toWebLocalFrame() OVERRIDE; 27 virtual WebLocalFrame* toWebLocalFrame() OVERRIDE;
28 virtual bool isWebRemoteFrame() const OVERRIDE; 28 virtual bool isWebRemoteFrame() const OVERRIDE;
29 virtual WebRemoteFrame* toWebRemoteFrame() OVERRIDE; 29 virtual WebRemoteFrame* toWebRemoteFrame() OVERRIDE;
30 virtual void close() OVERRIDE; 30 virtual void close() OVERRIDE;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 virtual WebRect selectionBoundsRect() const OVERRIDE; 170 virtual WebRect selectionBoundsRect() const OVERRIDE;
171 171
172 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const OVERRIDE; 172 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const OVERRIDE;
173 virtual WebString layerTreeAsText(bool showDebugInfo = false) const OVERRIDE ; 173 virtual WebString layerTreeAsText(bool showDebugInfo = false) const OVERRIDE ;
174 174
175 virtual WebLocalFrame* createLocalChild(const WebString& name, WebFrameClien t*) OVERRIDE; 175 virtual WebLocalFrame* createLocalChild(const WebString& name, WebFrameClien t*) OVERRIDE;
176 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebFrameCli ent*) OVERRIDE; 176 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebFrameCli ent*) OVERRIDE;
177 177
178 void initializeCoreFrame(FrameHost*, FrameOwner*, const AtomicString& name); 178 void initializeCoreFrame(FrameHost*, FrameOwner*, const AtomicString& name);
179 179
180 void setCoreFrame(PassRefPtr<RemoteFrame>); 180 void setCoreFrame(PassRefPtrWillBeRawPtr<RemoteFrame>);
181 RemoteFrame* frame() const { return m_frame.get(); } 181 RemoteFrame* frame() const { return m_frame.get(); }
182 182
183 static WebRemoteFrameImpl* fromFrame(RemoteFrame&); 183 static WebRemoteFrameImpl* fromFrame(RemoteFrame&);
184 184
185 virtual void trace(Visitor*);
186
185 private: 187 private:
186 RemoteFrameClient m_frameClient; 188 RemoteFrameClient m_frameClient;
187 RefPtr<RemoteFrame> m_frame; 189 RefPtrWillBeMember<RemoteFrame> m_frame;
188 190
189 HashMap<WebFrame*, OwnPtr<FrameOwner> > m_ownersForChildren; 191 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner> > m_ownersForChi ldren;
190 }; 192 };
191 193
192 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame() , frame.isWebRemoteFrame()); 194 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame() , frame.isWebRemoteFrame());
193 195
194 } // namespace blink 196 } // namespace blink
195 197
196 #endif // WebRemoteFrameImpl_h 198 #endif // WebRemoteFrameImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698