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

Side by Side Diff: Source/core/frame/RemoteFrame.cpp

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors 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 #include "config.h" 5 #include "config.h"
6 #include "core/frame/RemoteFrame.h" 6 #include "core/frame/RemoteFrame.h"
7 7
8 #include "core/frame/RemoteFrameView.h" 8 #include "core/frame/RemoteFrameView.h"
9 #include "core/html/HTMLFrameOwnerElement.h" 9 #include "core/html/HTMLFrameOwnerElement.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 inline RemoteFrame::RemoteFrame(FrameClient* client, FrameHost* host, FrameOwner * owner) 13 inline RemoteFrame::RemoteFrame(FrameClient* client, FrameHost* host, FrameOwner * owner)
14 : Frame(client, host, owner) 14 : Frame(client, host, owner)
15 { 15 {
16 } 16 }
17 17
18 PassRefPtr<RemoteFrame> RemoteFrame::create(FrameClient* client, FrameHost* host , FrameOwner* owner) 18 PassRefPtrWillBeRawPtr<RemoteFrame> RemoteFrame::create(FrameClient* client, Fra meHost* host, FrameOwner* owner)
19 { 19 {
20 RefPtr<RemoteFrame> frame = adoptRef(new RemoteFrame(client, host, owner)); 20 return adoptRefWillBeNoop(new RemoteFrame(client, host, owner));
21 return frame.release();
22 } 21 }
23 22
24 RemoteFrame::~RemoteFrame() 23 RemoteFrame::~RemoteFrame()
25 { 24 {
26 setView(nullptr); 25 setView(nullptr);
27 } 26 }
28 27
29 void RemoteFrame::detach() 28 void RemoteFrame::detach()
30 { 29 {
31 detachChildren(); 30 detachChildren();
32 m_host = 0; 31 m_host = nullptr;
33 } 32 }
34 33
35 void RemoteFrame::setView(PassRefPtr<RemoteFrameView> view) 34 void RemoteFrame::setView(PassRefPtr<RemoteFrameView> view)
36 { 35 {
37 m_view = view; 36 m_view = view;
38 } 37 }
39 38
40 void RemoteFrame::createView() 39 void RemoteFrame::createView()
41 { 40 {
42 RefPtr<RemoteFrameView> view = RemoteFrameView::create(this); 41 RefPtr<RemoteFrameView> view = RemoteFrameView::create(this);
43 setView(view); 42 setView(view);
44 43
45 if (ownerRenderer()) { 44 if (ownerRenderer()) {
46 HTMLFrameOwnerElement* owner = deprecatedLocalOwner(); 45 HTMLFrameOwnerElement* owner = deprecatedLocalOwner();
47 ASSERT(owner); 46 ASSERT(owner);
48 owner->setWidget(view); 47 owner->setWidget(view);
49 } 48 }
50 } 49 }
51 50
52 } // namespace blink 51 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698