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

Side by Side Diff: Source/core/html/imports/HTMLImportsController.cpp

Issue 299313013: Remove indirection plumbing from HTMLImportChild. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 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 unified diff | Download patch | Annotate | Revision Log
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 ResourcePtr<RawResource> resource = parent->document()->fetcher()->fetchImpo rt(request); 113 ResourcePtr<RawResource> resource = parent->document()->fetcher()->fetchImpo rt(request);
114 if (!resource) 114 if (!resource)
115 return 0; 115 return 0;
116 116
117 HTMLImportLoader* loader = createLoader(); 117 HTMLImportLoader* loader = createLoader();
118 HTMLImportChild* child = createChild(request.url(), loader, parent, client); 118 HTMLImportChild* child = createChild(request.url(), loader, parent, client);
119 // We set resource after the import tree is built since 119 // We set resource after the import tree is built since
120 // Resource::addClient() immediately calls back to feed the bytes when the r esource is cached. 120 // Resource::addClient() immediately calls back to feed the bytes when the r esource is cached.
121 loader->startLoading(resource); 121 loader->startLoading(resource);
122 child->didStartLoading(); 122 child->didStartLoading();
123
124 return child; 123 return child;
125 } 124 }
126 125
127 Document* HTMLImportsController::master() const 126 Document* HTMLImportsController::master() const
128 { 127 {
129 return root()->document(); 128 return root()->document();
130 } 129 }
131 130
132 bool HTMLImportsController::shouldBlockScriptExecution(const Document& document) const 131 bool HTMLImportsController::shouldBlockScriptExecution(const Document& document) const
133 { 132 {
(...skipping 20 matching lines...) Expand all
154 { 153 {
155 for (size_t i = 0; i < m_loaders.size(); ++i) { 154 for (size_t i = 0; i < m_loaders.size(); ++i) {
156 if (m_loaders[i]->document() == &document) 155 if (m_loaders[i]->document() == &document)
157 return m_loaders[i].get(); 156 return m_loaders[i].get();
158 } 157 }
159 158
160 return 0; 159 return 0;
161 } 160 }
162 161
163 } // namespace WebCore 162 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/imports/HTMLImportStateResolver.cpp ('k') | Source/core/html/imports/LinkImport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698