Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(mojo::URLRespon sePtr response) | 96 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(mojo::URLRespon sePtr response) |
| 97 { | 97 { |
| 98 ASSERT(!m_imports.isEmpty()); | 98 ASSERT(!m_imports.isEmpty()); |
| 99 WeakPtr<Document> contextDocument = m_controller->master()->contextDocument( ); | 99 WeakPtr<Document> contextDocument = m_controller->master()->contextDocument( ); |
| 100 ASSERT(contextDocument.get()); | 100 ASSERT(contextDocument.get()); |
| 101 KURL url(ParsedURLString, String::fromUTF8(response->url)); | 101 KURL url(ParsedURLString, String::fromUTF8(response->url)); |
| 102 DocumentInit init = DocumentInit(url, 0, contextDocument, m_controller) | 102 DocumentInit init = DocumentInit(url, 0, contextDocument, m_controller) |
| 103 .withRegistrationContext(m_controller->master()->registrationContext()); | 103 .withRegistrationContext(m_controller->master()->registrationContext()); |
| 104 m_document = HTMLDocument::create(init); | 104 m_document = HTMLDocument::create(init); |
| 105 m_module = Module::create(contextDocument.get(), nullptr, m_document.get(), url.string()); | 105 m_module = Module::create(contextDocument.get(), nullptr, m_document.get(), url.string()); |
| 106 m_document->startParsing(); | 106 m_document->startParsing()->parse(response->body.Pass()); |
|
eseidel
2014/11/12 19:02:14
Should this just take the mojo pipe in the startPa
abarth-chromium
2014/11/12 21:13:57
Yes, that would be sensible, but in a later CL in
| |
| 107 m_document->parser()->parse(response->body.Pass()); | |
| 108 return StateLoading; | 107 return StateLoading; |
| 109 } | 108 } |
| 110 | 109 |
| 111 HTMLImportLoader::State HTMLImportLoader::finishWriting() | 110 HTMLImportLoader::State HTMLImportLoader::finishWriting() |
| 112 { | 111 { |
| 113 return StateWritten; | 112 return StateWritten; |
| 114 } | 113 } |
| 115 | 114 |
| 116 HTMLImportLoader::State HTMLImportLoader::finishParsing() | 115 HTMLImportLoader::State HTMLImportLoader::finishParsing() |
| 117 { | 116 { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 200 { | 199 { |
| 201 visitor->trace(m_controller); | 200 visitor->trace(m_controller); |
| 202 #if ENABLE(OILPAN) | 201 #if ENABLE(OILPAN) |
| 203 visitor->trace(m_imports); | 202 visitor->trace(m_imports); |
| 204 #endif | 203 #endif |
| 205 visitor->trace(m_document); | 204 visitor->trace(m_document); |
| 206 visitor->trace(m_microtaskQueue); | 205 visitor->trace(m_microtaskQueue); |
| 207 } | 206 } |
| 208 | 207 |
| 209 } // namespace blink | 208 } // namespace blink |
| OLD | NEW |