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

Side by Side Diff: Source/web/WebLocalFrameImpl.cpp

Issue 1306793003: Oilpan: Move FrameLoaderClient class hierarchy into Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebPagePopupImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 WebLocalFrameImpl* frame = new WebLocalFrameImpl(scope, client); 1653 WebLocalFrameImpl* frame = new WebLocalFrameImpl(scope, client);
1654 #if ENABLE(OILPAN) 1654 #if ENABLE(OILPAN)
1655 return frame; 1655 return frame;
1656 #else 1656 #else
1657 return adoptRef(frame).leakRef(); 1657 return adoptRef(frame).leakRef();
1658 #endif 1658 #endif
1659 } 1659 }
1660 1660
1661 WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* cli ent) 1661 WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* cli ent)
1662 : WebLocalFrame(scope) 1662 : WebLocalFrame(scope)
1663 , m_frameLoaderClientImpl(this) 1663 , m_frameLoaderClientImpl(FrameLoaderClientImpl::create(this))
1664 , m_frameWidget(0) 1664 , m_frameWidget(0)
1665 , m_client(client) 1665 , m_client(client)
1666 , m_autofillClient(0) 1666 , m_autofillClient(0)
1667 , m_contentSettingsClient(0) 1667 , m_contentSettingsClient(0)
1668 , m_inputEventsScaleFactorForEmulation(1) 1668 , m_inputEventsScaleFactorForEmulation(1)
1669 , m_userMediaClientImpl(this) 1669 , m_userMediaClientImpl(this)
1670 , m_geolocationClientProxy(GeolocationClientProxy::create(client ? client->g eolocationClient() : 0)) 1670 , m_geolocationClientProxy(GeolocationClientProxy::create(client ? client->g eolocationClient() : 0))
1671 , m_webDevToolsFrontend(0) 1671 , m_webDevToolsFrontend(0)
1672 #if ENABLE(OILPAN) 1672 #if ENABLE(OILPAN)
1673 , m_selfKeepAlive(this) 1673 , m_selfKeepAlive(this)
(...skipping 11 matching lines...) Expand all
1685 frameCount--; 1685 frameCount--;
1686 1686
1687 #if !ENABLE(OILPAN) 1687 #if !ENABLE(OILPAN)
1688 cancelPendingScopingEffort(); 1688 cancelPendingScopingEffort();
1689 #endif 1689 #endif
1690 } 1690 }
1691 1691
1692 #if ENABLE(OILPAN) 1692 #if ENABLE(OILPAN)
1693 DEFINE_TRACE(WebLocalFrameImpl) 1693 DEFINE_TRACE(WebLocalFrameImpl)
1694 { 1694 {
1695 visitor->trace(m_frameLoaderClientImpl);
1695 visitor->trace(m_frame); 1696 visitor->trace(m_frame);
1696 visitor->trace(m_devToolsAgent); 1697 visitor->trace(m_devToolsAgent);
1697 visitor->trace(m_inspectorOverlay); 1698 visitor->trace(m_inspectorOverlay);
1698 visitor->trace(m_textFinder); 1699 visitor->trace(m_textFinder);
1699 visitor->trace(m_printContext); 1700 visitor->trace(m_printContext);
1700 visitor->trace(m_geolocationClientProxy); 1701 visitor->trace(m_geolocationClientProxy);
1701 visitor->template registerWeakMembers<WebFrame, &WebFrame::clearWeakFrames>( this); 1702 visitor->template registerWeakMembers<WebFrame, &WebFrame::clearWeakFrames>( this);
1702 WebFrame::traceFrames(visitor, this); 1703 WebFrame::traceFrames(visitor, this);
1703 } 1704 }
1704 #endif 1705 #endif
(...skipping 27 matching lines...) Expand all
1732 USBController::provideTo(*m_frame, m_client ? m_client->usbClient() : nullptr); 1733 USBController::provideTo(*m_frame, m_client ? m_client->usbClient() : nullptr);
1733 if (RuntimeEnabledFeatures::webVREnabled()) 1734 if (RuntimeEnabledFeatures::webVREnabled())
1734 VRController::provideTo(*m_frame, m_client ? m_client->webVRClient() : nullptr); 1735 VRController::provideTo(*m_frame, m_client ? m_client->webVRClient() : nullptr);
1735 if (RuntimeEnabledFeatures::wakeLockEnabled()) 1736 if (RuntimeEnabledFeatures::wakeLockEnabled())
1736 ScreenWakeLock::provideTo(*m_frame, m_client ? m_client->wakeLockCli ent() : nullptr); 1737 ScreenWakeLock::provideTo(*m_frame, m_client ? m_client->wakeLockCli ent() : nullptr);
1737 } 1738 }
1738 } 1739 }
1739 1740
1740 PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::initializeCoreFrame(FrameH ost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& fall backName) 1741 PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::initializeCoreFrame(FrameH ost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& fall backName)
1741 { 1742 {
1742 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClie ntImpl, host, owner); 1743 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(m_frameLoaderClien tImpl.get(), host, owner);
1743 setCoreFrame(frame); 1744 setCoreFrame(frame);
1744 frame->tree().setName(name, fallbackName); 1745 frame->tree().setName(name, fallbackName);
1745 // We must call init() after m_frame is assigned because it is referenced 1746 // We must call init() after m_frame is assigned because it is referenced
1746 // during init(). Note that this may dispatch JS events; the frame may be 1747 // during init(). Note that this may dispatch JS events; the frame may be
1747 // detached after init() returns. 1748 // detached after init() returns.
1748 frame->init(); 1749 frame->init();
1749 return frame; 1750 return frame;
1750 } 1751 }
1751 1752
1752 PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const Fra meLoadRequest& request, 1753 PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const Fra meLoadRequest& request,
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 } 2004 }
2004 2005
2005 void WebLocalFrameImpl::initializeToReplaceRemoteFrame(WebRemoteFrame* oldWebFra me, const WebString& name, WebSandboxFlags flags) 2006 void WebLocalFrameImpl::initializeToReplaceRemoteFrame(WebRemoteFrame* oldWebFra me, const WebString& name, WebSandboxFlags flags)
2006 { 2007 {
2007 Frame* oldFrame = toCoreFrame(oldWebFrame); 2008 Frame* oldFrame = toCoreFrame(oldWebFrame);
2008 // Note: this *always* temporarily sets a frame owner, even for main frames! 2009 // Note: this *always* temporarily sets a frame owner, even for main frames!
2009 // When a core Frame is created with no owner, it attempts to set itself as 2010 // When a core Frame is created with no owner, it attempts to set itself as
2010 // the main frame of the Page. However, this is a provisional frame, and may 2011 // the main frame of the Page. However, this is a provisional frame, and may
2011 // disappear, so Page::m_mainFrame can't be updated just yet. 2012 // disappear, so Page::m_mainFrame can't be updated just yet.
2012 OwnPtrWillBeRawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nu llptr, SandboxNone); 2013 OwnPtrWillBeRawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nu llptr, SandboxNone);
2013 m_frame = LocalFrame::create(&m_frameLoaderClientImpl, oldFrame->host(), tem pOwner.get()); 2014 m_frame = LocalFrame::create(m_frameLoaderClientImpl.get(), oldFrame->host() , tempOwner.get());
2014 m_frame->setOwner(oldFrame->owner()); 2015 m_frame->setOwner(oldFrame->owner());
2015 if (m_frame->owner() && !m_frame->owner()->isLocal()) 2016 if (m_frame->owner() && !m_frame->owner()->isLocal())
2016 toRemoteBridgeFrameOwner(m_frame->owner())->setSandboxFlags(static_cast< SandboxFlags>(flags)); 2017 toRemoteBridgeFrameOwner(m_frame->owner())->setSandboxFlags(static_cast< SandboxFlags>(flags));
2017 m_frame->tree().setName(name); 2018 m_frame->tree().setName(name);
2018 setParent(oldWebFrame->parent()); 2019 setParent(oldWebFrame->parent());
2019 setOpener(oldWebFrame->opener()); 2020 setOpener(oldWebFrame->opener());
2020 // We must call init() after m_frame is assigned because it is referenced 2021 // We must call init() after m_frame is assigned because it is referenced
2021 // during init(). Note that this may dispatch JS events; the frame may be 2022 // during init(). Note that this may dispatch JS events; the frame may be
2022 // detached after init() returns. 2023 // detached after init() returns.
2023 m_frame->init(); 2024 m_frame->init();
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 } 2212 }
2212 2213
2213 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const 2214 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const
2214 { 2215 {
2215 if (!frame()) 2216 if (!frame())
2216 return WebSandboxFlags::None; 2217 return WebSandboxFlags::None;
2217 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2218 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2218 } 2219 }
2219 2220
2220 } // namespace blink 2221 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebPagePopupImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698