| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 } | 182 } |
| 183 | 183 |
| 184 void HTMLImportChild::shareLoader(HTMLImportChild* loader) | 184 void HTMLImportChild::shareLoader(HTMLImportChild* loader) |
| 185 { | 185 { |
| 186 ASSERT(!m_loader); | 186 ASSERT(!m_loader); |
| 187 m_loader = loader->m_loader; | 187 m_loader = loader->m_loader; |
| 188 m_loader->addClient(this); | 188 m_loader->addClient(this); |
| 189 root()->blockerGone(); | 189 root()->blockerGone(); |
| 190 } | 190 } |
| 191 | 191 |
| 192 bool HTMLImportChild::isProcessing() const | |
| 193 { | |
| 194 return m_loader && m_loader->isOwnedBy(this) && !m_loader->isDone(); | |
| 195 } | |
| 196 | |
| 197 bool HTMLImportChild::isDone() const | 192 bool HTMLImportChild::isDone() const |
| 198 { | 193 { |
| 199 return m_loader && m_loader->isDone(); | 194 return m_loader && m_loader->isDone(); |
| 200 } | 195 } |
| 201 | 196 |
| 197 bool HTMLImportChild::ownsLoader() const |
| 198 { |
| 199 return m_loader->isOwnedBy(this); |
| 200 } |
| 201 |
| 202 bool HTMLImportChild::loaderHasError() const | 202 bool HTMLImportChild::loaderHasError() const |
| 203 { | 203 { |
| 204 return m_loader && m_loader->hasError(); | 204 return m_loader && m_loader->hasError(); |
| 205 } | 205 } |
| 206 | 206 |
| 207 | 207 |
| 208 void HTMLImportChild::addClient(HTMLImportChildClient* client) | 208 void HTMLImportChild::addClient(HTMLImportChildClient* client) |
| 209 { | 209 { |
| 210 ASSERT(!m_traversingClients); | 210 ASSERT(!m_traversingClients); |
| 211 ASSERT(!m_clients.contains(client)); | 211 ASSERT(!m_clients.contains(client)); |
| 212 m_clients.append(client); | 212 m_clients.append(client); |
| 213 } | 213 } |
| 214 | 214 |
| 215 void HTMLImportChild::removeClient(HTMLImportChildClient* client) | 215 void HTMLImportChild::removeClient(HTMLImportChildClient* client) |
| 216 { | 216 { |
| 217 ASSERT(!m_traversingClients); | 217 ASSERT(!m_traversingClients); |
| 218 size_t i = m_clients.find(client); | 218 size_t i = m_clients.find(client); |
| 219 ASSERT(i != kNotFound); | 219 ASSERT(i != kNotFound); |
| 220 m_clients.remove(i); | 220 m_clients.remove(i); |
| 221 } | 221 } |
| 222 | 222 |
| 223 } // namespace WebCore | 223 } // namespace WebCore |
| OLD | NEW |