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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 bool WebLocalFrameImpl::hasVerticalScrollbar() const | 673 bool WebLocalFrameImpl::hasVerticalScrollbar() const |
674 { | 674 { |
675 return frame() && frame()->view() && frame()->view()->verticalScrollbar(); | 675 return frame() && frame()->view() && frame()->view()->verticalScrollbar(); |
676 } | 676 } |
677 | 677 |
678 WebView* WebLocalFrameImpl::view() const | 678 WebView* WebLocalFrameImpl::view() const |
679 { | 679 { |
680 return viewImpl(); | 680 return viewImpl(); |
681 } | 681 } |
682 | 682 |
683 void WebLocalFrameImpl::setOpener(WebFrame* opener) | |
684 { | |
685 WebFrame::setOpener(opener); | |
686 | |
687 // TODO(alexmos,dcheng): This should ASSERT(m_frame) once we no longer have | |
688 // provisional local frames. | |
689 if (m_frame && m_frame->document()) | |
690 m_frame->document()->initSecurityContext(); | |
691 } | |
692 | |
693 WebDocument WebLocalFrameImpl::document() const | 683 WebDocument WebLocalFrameImpl::document() const |
694 { | 684 { |
695 if (!frame() || !frame()->document()) | 685 if (!frame() || !frame()->document()) |
696 return WebDocument(); | 686 return WebDocument(); |
697 return WebDocument(frame()->document()); | 687 return WebDocument(frame()->document()); |
698 } | 688 } |
699 | 689 |
700 WebPerformance WebLocalFrameImpl::performance() const | 690 WebPerformance WebLocalFrameImpl::performance() const |
701 { | 691 { |
702 if (!frame()) | 692 if (!frame()) |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1412 WebString WebLocalFrameImpl::layerTreeAsText(bool showDebugInfo) const | 1402 WebString WebLocalFrameImpl::layerTreeAsText(bool showDebugInfo) const |
1413 { | 1403 { |
1414 if (!frame()) | 1404 if (!frame()) |
1415 return WebString(); | 1405 return WebString(); |
1416 | 1406 |
1417 return WebString(frame()->layerTreeAsText(showDebugInfo ? LayerTreeIncludesD
ebugInfo : LayerTreeNormal)); | 1407 return WebString(frame()->layerTreeAsText(showDebugInfo ? LayerTreeIncludesD
ebugInfo : LayerTreeNormal)); |
1418 } | 1408 } |
1419 | 1409 |
1420 // WebLocalFrameImpl public ----------------------------------------------------
----- | 1410 // WebLocalFrameImpl public ----------------------------------------------------
----- |
1421 | 1411 |
1422 WebLocalFrame* WebLocalFrame::create(WebTreeScopeType scope, WebFrameClient* cli
ent) | 1412 WebLocalFrame* WebLocalFrame::create(WebTreeScopeType scope, WebFrameClient* cli
ent, WebFrame* opener) |
1423 { | 1413 { |
1424 return WebLocalFrameImpl::create(scope, client); | 1414 return WebLocalFrameImpl::create(scope, client, opener); |
1425 } | 1415 } |
1426 | 1416 |
1427 WebLocalFrame* WebLocalFrame::createProvisional(WebFrameClient* client, WebRemot
eFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerProperties& frame
OwnerProperties) | 1417 WebLocalFrame* WebLocalFrame::createProvisional(WebFrameClient* client, WebRemot
eFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerProperties& frame
OwnerProperties) |
1428 { | 1418 { |
1429 return WebLocalFrameImpl::createProvisional(client, oldWebFrame, flags, fram
eOwnerProperties); | 1419 return WebLocalFrameImpl::createProvisional(client, oldWebFrame, flags, fram
eOwnerProperties); |
1430 } | 1420 } |
1431 | 1421 |
1432 WebLocalFrameImpl* WebLocalFrameImpl::create(WebTreeScopeType scope, WebFrameCli
ent* client) | 1422 WebLocalFrameImpl* WebLocalFrameImpl::create(WebTreeScopeType scope, WebFrameCli
ent* client, WebFrame* opener) |
1433 { | 1423 { |
1434 WebLocalFrameImpl* frame = new WebLocalFrameImpl(scope, client); | 1424 WebLocalFrameImpl* frame = new WebLocalFrameImpl(scope, client); |
| 1425 frame->setOpener(opener); |
1435 #if ENABLE(OILPAN) | 1426 #if ENABLE(OILPAN) |
1436 return frame; | 1427 return frame; |
1437 #else | 1428 #else |
1438 return adoptRef(frame).leakRef(); | 1429 return adoptRef(frame).leakRef(); |
1439 #endif | 1430 #endif |
1440 } | 1431 } |
1441 | 1432 |
1442 WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(WebFrameClient* client,
WebRemoteFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerPropertie
s& frameOwnerProperties) | 1433 WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(WebFrameClient* client,
WebRemoteFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerPropertie
s& frameOwnerProperties) |
1443 { | 1434 { |
1444 RefPtrWillBeRawPtr<WebLocalFrameImpl> webFrame = adoptRefWillBeNoop(new WebL
ocalFrameImpl(oldWebFrame, client)); | 1435 RefPtrWillBeRawPtr<WebLocalFrameImpl> webFrame = adoptRefWillBeNoop(new WebL
ocalFrameImpl(oldWebFrame, client)); |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2197 return WebSandboxFlags::None; | 2188 return WebSandboxFlags::None; |
2198 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2189 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
2199 } | 2190 } |
2200 | 2191 |
2201 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) | 2192 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) |
2202 { | 2193 { |
2203 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2194 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
2204 } | 2195 } |
2205 | 2196 |
2206 } // namespace blink | 2197 } // namespace blink |
OLD | NEW |