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

Side by Side Diff: third_party/WebKit/Source/core/dom/ScriptElementBase.h

Issue 2801243002: More tweaks to <script nonce> hiding. (Closed)
Patch Set: Element. Created 3 years, 8 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) 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 virtual String IntegrityAttributeValue() const = 0; 52 virtual String IntegrityAttributeValue() const = 0;
53 virtual String LanguageAttributeValue() const = 0; 53 virtual String LanguageAttributeValue() const = 0;
54 virtual String SourceAttributeValue() const = 0; 54 virtual String SourceAttributeValue() const = 0;
55 virtual String TypeAttributeValue() const = 0; 55 virtual String TypeAttributeValue() const = 0;
56 56
57 virtual String TextFromChildren() = 0; 57 virtual String TextFromChildren() = 0;
58 virtual String TextContent() const = 0; 58 virtual String TextContent() const = 0;
59 virtual bool HasSourceAttribute() const = 0; 59 virtual bool HasSourceAttribute() const = 0;
60 virtual bool IsConnected() const = 0; 60 virtual bool IsConnected() const = 0;
61 virtual bool HasChildren() const = 0; 61 virtual bool HasChildren() const = 0;
62 virtual bool IsNonceableElement() const = 0; 62 virtual const AtomicString& GetNonceForElement() const = 0;
63 virtual AtomicString InitiatorName() const = 0; 63 virtual AtomicString InitiatorName() const = 0;
64 64
65 virtual bool AllowInlineScriptForCSP(const AtomicString& nonce, 65 virtual bool AllowInlineScriptForCSP(const AtomicString& nonce,
66 const WTF::OrdinalNumber&, 66 const WTF::OrdinalNumber&,
67 const String& script_content) = 0; 67 const String& script_content) = 0;
68 virtual Document& GetDocument() const = 0; 68 virtual Document& GetDocument() const = 0;
69 virtual void SetScriptElementForBinding( 69 virtual void SetScriptElementForBinding(
70 HTMLScriptElementOrSVGScriptElement&) = 0; 70 HTMLScriptElementOrSVGScriptElement&) = 0;
71 71
72 ScriptLoader* Loader() const { return loader_.Get(); } 72 ScriptLoader* Loader() const { return loader_.Get(); }
73 73
74 AtomicString nonce() const { return nonce_; }
75 void setNonce(const String& nonce) { nonce_ = AtomicString(nonce); }
76
77 DECLARE_VIRTUAL_TRACE(); 74 DECLARE_VIRTUAL_TRACE();
78 75
79 protected: 76 protected:
80 void InitializeScriptLoader(bool parser_inserted, 77 void InitializeScriptLoader(bool parser_inserted,
81 bool already_started, 78 bool already_started,
82 bool created_during_document_write); 79 bool created_during_document_write);
83 80
84 Member<ScriptLoader> loader_; 81 Member<ScriptLoader> loader_;
85
86 private:
87 AtomicString nonce_;
88 }; 82 };
89 83
90 } // namespace blink 84 } // namespace blink
91 85
92 #endif 86 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698