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

Side by Side Diff: Source/core/html/imports/HTMLImportChild.h

Issue 183883004: Let ContentSecurityPolicy shared between imports and the master. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adding guardRef()/guardDeref() Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/ContentSecurityPolicy.h ('k') | Source/core/html/imports/HTMLImportChild.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // An import tree node subclas to encapsulate imported document 49 // An import tree node subclas to encapsulate imported document
50 // lifecycle. This class is owned by LinkStyle. The actual loading 50 // lifecycle. This class is owned by LinkStyle. The actual loading
51 // is done by HTMLImportLoader, which can be shared among multiple 51 // is done by HTMLImportLoader, which can be shared among multiple
52 // HTMLImportChild of same link URL. 52 // HTMLImportChild of same link URL.
53 // 53 //
54 // HTMLImportChild implements ResourceClient through ResourceOwner 54 // HTMLImportChild implements ResourceClient through ResourceOwner
55 // so that it can speculatively request linked resources while it is unblocked. 55 // so that it can speculatively request linked resources while it is unblocked.
56 // 56 //
57 class HTMLImportChild FINAL : public HTMLImport, public HTMLImportLoaderClient, public ResourceOwner<RawResource> { 57 class HTMLImportChild FINAL : public HTMLImport, public HTMLImportLoaderClient, public ResourceOwner<RawResource> {
58 public: 58 public:
59 HTMLImportChild(const KURL&, bool createdByParser); 59 HTMLImportChild(Document&, const KURL&, bool createdByParser);
60 virtual ~HTMLImportChild(); 60 virtual ~HTMLImportChild();
61 61
62 HTMLLinkElement* link() const; 62 HTMLLinkElement* link() const;
63 Document* importedDocument() const; 63 Document* importedDocument() const;
64 const KURL& url() const { return m_url; } 64 const KURL& url() const { return m_url; }
65 65
66 void wasAlreadyLoaded(); 66 void wasAlreadyLoaded();
67 void startLoading(const ResourcePtr<RawResource>&); 67 void startLoading(const ResourcePtr<RawResource>&);
68 void importDestroyed(); 68 void importDestroyed();
69 69
(...skipping 25 matching lines...) Expand all
95 virtual void notifyFinished(Resource*) OVERRIDE { } 95 virtual void notifyFinished(Resource*) OVERRIDE { }
96 96
97 // HTMLImportLoaderClient 97 // HTMLImportLoaderClient
98 virtual void didFinishLoading() OVERRIDE; 98 virtual void didFinishLoading() OVERRIDE;
99 99
100 void didFinish(); 100 void didFinish();
101 void createLoader(); 101 void createLoader();
102 void shareLoader(HTMLImportChild*); 102 void shareLoader(HTMLImportChild*);
103 void ensureLoader(); 103 void ensureLoader();
104 104
105 Document& m_master;
105 KURL m_url; 106 KURL m_url;
106 CustomElementMicrotaskImportStep* m_customElementMicrotaskStep; 107 CustomElementMicrotaskImportStep* m_customElementMicrotaskStep;
107 RefPtr<HTMLImportLoader> m_loader; 108 RefPtr<HTMLImportLoader> m_loader;
108 HTMLImportChildClient* m_client; 109 HTMLImportChildClient* m_client;
109 }; 110 };
110 111
111 inline HTMLImportChild* toHTMLImportChild(HTMLImport* import) 112 inline HTMLImportChild* toHTMLImportChild(HTMLImport* import)
112 { 113 {
113 ASSERT(!import || import->isChild()); 114 ASSERT(!import || import->isChild());
114 return static_cast<HTMLImportChild*>(import); 115 return static_cast<HTMLImportChild*>(import);
115 } 116 }
116 117
117 } // namespace WebCore 118 } // namespace WebCore
118 119
119 #endif // HTMLImportChild_h 120 #endif // HTMLImportChild_h
OLDNEW
« no previous file with comments | « Source/core/frame/ContentSecurityPolicy.h ('k') | Source/core/html/imports/HTMLImportChild.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698