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

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 r181245 conflict 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 virtual WebRect selectionBoundsRect() const OVERRIDE; 171 virtual WebRect selectionBoundsRect() const OVERRIDE;
172 172
173 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const OVERRIDE; 173 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const OVERRIDE;
174 virtual WebString layerTreeAsText(bool showDebugInfo = false) const OVERRIDE ; 174 virtual WebString layerTreeAsText(bool showDebugInfo = false) const OVERRIDE ;
175 175
176 virtual WebLocalFrame* createLocalChild(const WebString& name, WebFrameClien t*) OVERRIDE; 176 virtual WebLocalFrame* createLocalChild(const WebString& name, WebFrameClien t*) OVERRIDE;
177 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebFrameCli ent*) OVERRIDE; 177 virtual WebRemoteFrame* createRemoteChild(const WebString& name, WebFrameCli ent*) OVERRIDE;
178 178
179 void initializeCoreFrame(FrameHost*, FrameOwner*, const AtomicString& name); 179 void initializeCoreFrame(FrameHost*, FrameOwner*, const AtomicString& name);
180 180
181 void setCoreFrame(PassRefPtr<RemoteFrame>); 181 void setCoreFrame(PassRefPtrWillBeRawPtr<RemoteFrame>);
182 RemoteFrame* frame() const { return m_frame.get(); } 182 RemoteFrame* frame() const { return m_frame.get(); }
183 183
184 static WebRemoteFrameImpl* fromFrame(RemoteFrame&); 184 static WebRemoteFrameImpl* fromFrame(RemoteFrame&);
185 185
186 virtual void trace(Visitor*);
187
186 private: 188 private:
187 RemoteFrameClient m_frameClient; 189 RemoteFrameClient m_frameClient;
188 RefPtr<RemoteFrame> m_frame; 190 RefPtrWillBeMember<RemoteFrame> m_frame;
189 191
190 HashMap<WebFrame*, OwnPtr<FrameOwner> > m_ownersForChildren; 192 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner> > m_ownersForChi ldren;
191 }; 193 };
192 194
193 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame() , frame.isWebRemoteFrame()); 195 DEFINE_TYPE_CASTS(WebRemoteFrameImpl, WebFrame, frame, frame->isWebRemoteFrame() , frame.isWebRemoteFrame());
194 196
195 } // namespace blink 197 } // namespace blink
196 198
197 #endif // WebRemoteFrameImpl_h 199 #endif // WebRemoteFrameImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698