OLD | NEW |
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 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1641 WebLocalFrameImpl* frame = new WebLocalFrameImpl(scope, client); | 1641 WebLocalFrameImpl* frame = new WebLocalFrameImpl(scope, client); |
1642 #if ENABLE(OILPAN) | 1642 #if ENABLE(OILPAN) |
1643 return frame; | 1643 return frame; |
1644 #else | 1644 #else |
1645 return adoptRef(frame).leakRef(); | 1645 return adoptRef(frame).leakRef(); |
1646 #endif | 1646 #endif |
1647 } | 1647 } |
1648 | 1648 |
1649 WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(WebFrameClient* client,
WebRemoteFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerPropertie
s& frameOwnerProperties) | 1649 WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(WebFrameClient* client,
WebRemoteFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerPropertie
s& frameOwnerProperties) |
1650 { | 1650 { |
1651 RefPtrWillBeRawPtr<WebLocalFrameImpl> webFrame = adoptRef(new WebLocalFrameI
mpl(oldWebFrame, client)); | 1651 RefPtrWillBeRawPtr<WebLocalFrameImpl> webFrame = adoptRefWillBeNoop(new WebL
ocalFrameImpl(oldWebFrame, client)); |
1652 Frame* oldFrame = oldWebFrame->toImplBase()->frame(); | 1652 Frame* oldFrame = oldWebFrame->toImplBase()->frame(); |
1653 webFrame->setParent(oldWebFrame->parent()); | 1653 webFrame->setParent(oldWebFrame->parent()); |
1654 webFrame->setOpener(oldWebFrame->opener()); | 1654 webFrame->setOpener(oldWebFrame->opener()); |
1655 // Note: this *always* temporarily sets a frame owner, even for main frames! | 1655 // Note: this *always* temporarily sets a frame owner, even for main frames! |
1656 // When a core Frame is created with no owner, it attempts to set itself as | 1656 // When a core Frame is created with no owner, it attempts to set itself as |
1657 // the main frame of the Page. However, this is a provisional frame, and may | 1657 // the main frame of the Page. However, this is a provisional frame, and may |
1658 // disappear, so Page::m_mainFrame can't be updated just yet. | 1658 // disappear, so Page::m_mainFrame can't be updated just yet. |
1659 OwnPtrWillBeRawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nu
llptr, SandboxNone, WebFrameOwnerProperties()); | 1659 OwnPtrWillBeRawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nu
llptr, SandboxNone, WebFrameOwnerProperties()); |
1660 // TODO(dcheng): This block is very similar to initializeCoreFrame. Try to r
euse it here. | 1660 // TODO(dcheng): This block is very similar to initializeCoreFrame. Try to r
euse it here. |
1661 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(webFrame->m_frameL
oaderClientImpl.get(), oldFrame->host(), tempOwner.get()); | 1661 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(webFrame->m_frameL
oaderClientImpl.get(), oldFrame->host(), tempOwner.get()); |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2233 } | 2233 } |
2234 | 2234 |
2235 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const | 2235 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const |
2236 { | 2236 { |
2237 if (!frame()) | 2237 if (!frame()) |
2238 return WebSandboxFlags::None; | 2238 return WebSandboxFlags::None; |
2239 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2239 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
2240 } | 2240 } |
2241 | 2241 |
2242 } // namespace blink | 2242 } // namespace blink |
OLD | NEW |