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

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

Issue 2011763006: Add an iframe permissions= attribute for implementing permission delegation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-delegation-1-flag
Patch Set: Blink-side Created 4 years, 5 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 /* 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 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 } 1504 }
1505 1505
1506 LocalFrame* WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& request, 1506 LocalFrame* WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& request,
1507 const AtomicString& name, HTMLFrameOwnerElement* ownerElement) 1507 const AtomicString& name, HTMLFrameOwnerElement* ownerElement)
1508 { 1508 {
1509 DCHECK(m_client); 1509 DCHECK(m_client);
1510 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe"); 1510 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe");
1511 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope() 1511 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope()
1512 ? WebTreeScopeType::Document 1512 ? WebTreeScopeType::Document
1513 : WebTreeScopeType::Shadow; 1513 : WebTreeScopeType::Shadow;
1514 WebFrameOwnerProperties ownerProperties(ownerElement->scrollingMode(), owner Element->marginWidth(), ownerElement->marginHeight(), ownerElement->allowFullscr een()); 1514 WebFrameOwnerProperties ownerProperties(ownerElement->scrollingMode(), owner Element->marginWidth(), ownerElement->marginHeight(), ownerElement->allowFullscr een(), ownerElement->delegatedPermissions());
1515 // FIXME: Using subResourceAttributeName as fallback is not a perfect 1515 // FIXME: Using subResourceAttributeName as fallback is not a perfect
1516 // solution. subResourceAttributeName returns just one attribute name. The 1516 // solution. subResourceAttributeName returns just one attribute name. The
1517 // element might not have the attribute, and there might be other attributes 1517 // element might not have the attribute, and there might be other attributes
1518 // which can identify the element. 1518 // which can identify the element.
1519 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFram e( 1519 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFram e(
1520 name, ownerElement->getAttribute(ownerElement->subResourceAttributeName( ))); 1520 name, ownerElement->getAttribute(ownerElement->subResourceAttributeName( )));
1521 WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChild Frame(this, scope, name, uniqueName, static_cast<WebSandboxFlags>(ownerElement-> getSandboxFlags()), ownerProperties)); 1521 WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChild Frame(this, scope, name, uniqueName, static_cast<WebSandboxFlags>(ownerElement-> getSandboxFlags()), ownerProperties));
1522 if (!webframeChild) 1522 if (!webframeChild)
1523 return nullptr; 1523 return nullptr;
1524 1524
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 { 2156 {
2157 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2157 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2158 } 2158 }
2159 2159
2160 void WebLocalFrameImpl::clearActiveFindMatch() 2160 void WebLocalFrameImpl::clearActiveFindMatch()
2161 { 2161 {
2162 ensureTextFinder().clearActiveFindMatch(); 2162 ensureTextFinder().clearActiveFindMatch();
2163 } 2163 }
2164 2164
2165 } // namespace blink 2165 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFrame.cpp ('k') | third_party/WebKit/public/web/WebFrameOwnerProperties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698