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

Unified Diff: third_party/WebKit/Source/core/html/HTMLIFrameElement.h

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, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLIFrameElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLIFrameElement.h b/third_party/WebKit/Source/core/html/HTMLIFrameElement.h
index 752d0c86fd74027d6b6bfba9a66867b963511cd0..885e35763d76143a600d6d055afc9d6ef5bd6567 100644
--- a/third_party/WebKit/Source/core/html/HTMLIFrameElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLIFrameElement.h
@@ -24,19 +24,26 @@
#ifndef HTMLIFrameElement_h
#define HTMLIFrameElement_h
+#include "core/CoreExport.h"
#include "core/html/HTMLFrameElementBase.h"
+#include "core/html/HTMLIFrameElementPermissions.h"
#include "core/html/HTMLIFrameElementSandbox.h"
+#include "public/platform/WebVector.h"
+#include "public/platform/modules/permissions/WebPermissionType.h"
namespace blink {
-class HTMLIFrameElement final : public HTMLFrameElementBase, public DOMTokenListObserver {
+class CORE_EXPORT HTMLIFrameElement final : public HTMLFrameElementBase {
DEFINE_WRAPPERTYPEINFO();
- USING_GARBAGE_COLLECTED_MIXIN(HTMLIFrameElement);
public:
DECLARE_NODE_FACTORY(HTMLIFrameElement);
DECLARE_VIRTUAL_TRACE();
~HTMLIFrameElement() override;
DOMTokenList* sandbox() const;
+ DOMTokenList* permissions() const;
+
+ void sandboxValueWasSet();
+ void permissionsValueWasSet();
private:
explicit HTMLIFrameElement(Document&);
@@ -55,16 +62,21 @@ private:
void didLoadNonEmptyDocument() override { m_didLoadNonEmptyDocument = true; }
bool isInteractiveContent() const override;
- void valueWasSet() override;
-
ReferrerPolicy referrerPolicyAttribute() override;
bool allowFullscreen() const override { return m_allowFullscreen; }
+ const WebVector<WebPermissionType>* delegatedPermissions() const override { return &m_delegatedPermissions; }
sof 2016/06/28 05:29:00 What is the assumed lifetime of this value? i.e.,
raymes 2016/06/28 06:49:46 The pointer is just used to reduce copied but the
sof 2016/06/28 06:57:48 ok, it seems unnecessary to resort to returning a
raymes 2016/06/29 05:54:47 I was trying to reduce copies :) I've returned a c
sof 2016/06/29 06:10:28 When & where to optimize is a perennial question,
+
+ bool initializePermissionsAttribute();
+
AtomicString m_name;
bool m_didLoadNonEmptyDocument;
bool m_allowFullscreen;
Member<HTMLIFrameElementSandbox> m_sandbox;
+ Member<HTMLIFrameElementPermissions> m_permissions;
+
+ WebVector<WebPermissionType> m_delegatedPermissions;
ReferrerPolicy m_referrerPolicy;
};

Powered by Google App Engine
This is Rietveld 408576698