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

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

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased upto r183571 Created 6 years, 2 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/RemoteFrameClient.h" 8 #include "core/frame/RemoteFrameClient.h"
9 #include "core/frame/RemoteFrameView.h" 9 #include "core/frame/RemoteFrameView.h"
10 #include "core/html/HTMLFrameOwnerElement.h" 10 #include "core/html/HTMLFrameOwnerElement.h"
(...skipping 25 matching lines...) Expand all
36 request.setHTTPReferrer(referrer); 36 request.setHTTPReferrer(referrer);
37 remoteFrameClient()->navigate(request, lockBackForwardList); 37 remoteFrameClient()->navigate(request, lockBackForwardList);
38 } 38 }
39 39
40 void RemoteFrame::detach() 40 void RemoteFrame::detach()
41 { 41 {
42 detachChildren(); 42 detachChildren();
43 m_host = nullptr; 43 m_host = nullptr;
44 } 44 }
45 45
46 void RemoteFrame::setView(PassRefPtr<RemoteFrameView> view) 46 void RemoteFrame::trace(Visitor* visitor)
47 { 47 {
48 visitor->trace(m_view);
49 Frame::trace(visitor);
50 }
51
52 void RemoteFrame::setView(PassRefPtrWillBeRawPtr<RemoteFrameView> view)
53 {
54 // Oilpan: as RemoteFrameView performs no finalization actions,
55 // no explicit dispose() of it needed here. (cf. FrameView::dispose().)
48 m_view = view; 56 m_view = view;
49 } 57 }
50 58
51 void RemoteFrame::createView() 59 void RemoteFrame::createView()
52 { 60 {
53 RefPtr<RemoteFrameView> view = RemoteFrameView::create(this); 61 RefPtrWillBeRawPtr<RemoteFrameView> view = RemoteFrameView::create(this);
54 setView(view); 62 setView(view);
55 63
56 if (ownerRenderer()) { 64 if (ownerRenderer()) {
57 HTMLFrameOwnerElement* owner = deprecatedLocalOwner(); 65 HTMLFrameOwnerElement* owner = deprecatedLocalOwner();
58 ASSERT(owner); 66 ASSERT(owner);
59 owner->setWidget(view); 67 owner->setWidget(view);
60 } 68 }
61 } 69 }
62 70
63 RemoteFrameClient* RemoteFrame::remoteFrameClient() const 71 RemoteFrameClient* RemoteFrame::remoteFrameClient() const
64 { 72 {
65 return static_cast<RemoteFrameClient*>(client()); 73 return static_cast<RemoteFrameClient*>(client());
66 } 74 }
67 75
68 } // namespace blink 76 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698