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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 bool isBlockedFromRunningScript() const { return m_state <= BlockedFromRunni ngScript; } | 143 bool isBlockedFromRunningScript() const { return m_state <= BlockedFromRunni ngScript; } |
| 144 bool isBlockedFromCreatingDocument() const { return m_state <= BlockedFromCr eatingDocument; } | 144 bool isBlockedFromCreatingDocument() const { return m_state <= BlockedFromCr eatingDocument; } |
| 145 bool isBlocked() const { return m_state < Ready; } | 145 bool isBlocked() const { return m_state < Ready; } |
| 146 | 146 |
| 147 void appendChild(HTMLImport*); | 147 void appendChild(HTMLImport*); |
| 148 | 148 |
| 149 virtual HTMLImportRoot* root() = 0; | 149 virtual HTMLImportRoot* root() = 0; |
| 150 virtual Document* document() const = 0; | 150 virtual Document* document() const = 0; |
| 151 virtual void wasDetachedFromDocument() = 0; | 151 virtual void wasDetachedFromDocument() = 0; |
| 152 virtual void didFinishParsing() = 0; | 152 virtual void didFinishParsing() = 0; |
| 153 virtual bool isProcessing() const = 0; | |
| 154 virtual bool isDone() const = 0; // FIXME: Should be renamed to haveFinished Loading() | 153 virtual bool isDone() const = 0; // FIXME: Should be renamed to haveFinished Loading() |
| 154 virtual bool ownsLoader() const { return false; } | |
| 155 virtual CustomElementPendingImport* pendingImport() const { return 0; } | 155 virtual CustomElementPendingImport* pendingImport() const { return 0; } |
| 156 | 156 |
| 157 protected: | 157 protected: |
| 158 enum State { | 158 enum State { |
| 159 BlockedFromCreatingDocument, | 159 BlockedFromCreatingDocument, |
| 160 BlockedFromRunningScript, | 160 BlockedFromRunningScript, |
| 161 WaitingLoaderOrChildren, | 161 WaitingLoaderOrChildren, |
| 162 Ready | 162 Ready |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 explicit HTMLImport(State state, bool createdByParser = false) | 165 explicit HTMLImport(State state, bool createdByParser = false) |
| 166 : m_state(state) | 166 : m_state(state) |
| 167 , m_createdByParser(createdByParser) | 167 , m_createdByParser(createdByParser) |
| 168 { } | 168 { } |
| 169 | 169 |
| 170 | |
|
dominicc (has gone to gerrit)
2014/01/10 06:44:52
Seems like there's excessive whitespace here.
| |
| 170 virtual void didUnblockFromCreatingDocument(); | 171 virtual void didUnblockFromCreatingDocument(); |
| 171 virtual void didUnblockFromRunningScript(); | 172 virtual void didUnblockFromRunningScript(); |
| 172 virtual void didBecomeReady(); | 173 virtual void didBecomeReady(); |
| 173 | 174 |
| 174 void loaderWasResolved(); | 175 void loaderWasResolved(); |
| 175 void loaderDidFinish(); | 176 void loaderDidFinish(); |
| 176 | 177 |
| 177 private: | 178 private: |
| 178 static void block(HTMLImport*); | 179 static void block(HTMLImport*); |
| 179 | 180 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 201 HTMLImportRoot() : HTMLImport(Ready) { } | 202 HTMLImportRoot() : HTMLImport(Ready) { } |
| 202 | 203 |
| 203 virtual void blockerGone() = 0; | 204 virtual void blockerGone() = 0; |
| 204 virtual HTMLImportsController* toController() = 0; | 205 virtual HTMLImportsController* toController() = 0; |
| 205 virtual HTMLImportChild* findLinkFor(const KURL&, HTMLImport* excluding = 0) const = 0; | 206 virtual HTMLImportChild* findLinkFor(const KURL&, HTMLImport* excluding = 0) const = 0; |
| 206 }; | 207 }; |
| 207 | 208 |
| 208 } // namespace WebCore | 209 } // namespace WebCore |
| 209 | 210 |
| 210 #endif // HTMLImport_h | 211 #endif // HTMLImport_h |
| OLD | NEW |