| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 virtual ScriptType GetScriptType() const = 0; | 81 virtual ScriptType GetScriptType() const = 0; |
| 82 | 82 |
| 83 DECLARE_VIRTUAL_TRACE(); | 83 DECLARE_VIRTUAL_TRACE(); |
| 84 | 84 |
| 85 virtual Script* GetSource(const KURL& document_url, | 85 virtual Script* GetSource(const KURL& document_url, |
| 86 bool& error_occurred) const = 0; | 86 bool& error_occurred) const = 0; |
| 87 | 87 |
| 88 // https://html.spec.whatwg.org/#the-script-is-ready | 88 // https://html.spec.whatwg.org/#the-script-is-ready |
| 89 virtual bool IsReady() const = 0; | 89 virtual bool IsReady() const = 0; |
| 90 | 90 |
| 91 virtual KURL Url() const = 0; |
| 91 virtual bool IsExternal() const = 0; | 92 virtual bool IsExternal() const = 0; |
| 92 virtual bool ErrorOccurred() const = 0; | 93 virtual bool ErrorOccurred() const = 0; |
| 93 virtual bool WasCanceled() const = 0; | 94 virtual bool WasCanceled() const = 0; |
| 94 virtual void StartStreamingIfPossible(Document*, ScriptStreamer::Type) = 0; | 95 virtual void StartStreamingIfPossible(Document*, ScriptStreamer::Type) = 0; |
| 95 | 96 |
| 96 // The following two methods are used for document.write() intervention and | 97 // Used for document.write() intervention. |
| 97 // have effects only for classic scripts. | 98 // Has effects only for classic scripts. |
| 98 virtual KURL UrlForClassicScript() const = 0; | |
| 99 virtual void RemoveFromMemoryCache() = 0; | 99 virtual void RemoveFromMemoryCache() = 0; |
| 100 | 100 |
| 101 void Dispose(); | 101 void Dispose(); |
| 102 | 102 |
| 103 protected: | 103 protected: |
| 104 PendingScript(ScriptElementBase*, const TextPosition& starting_position); | 104 PendingScript(ScriptElementBase*, const TextPosition& starting_position); |
| 105 | 105 |
| 106 virtual void DisposeInternal() = 0; | 106 virtual void DisposeInternal() = 0; |
| 107 | 107 |
| 108 PendingScriptClient* Client() { return client_; } | 108 PendingScriptClient* Client() { return client_; } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 120 | 120 |
| 121 TextPosition starting_position_; // Only used for inline script tags. | 121 TextPosition starting_position_; // Only used for inline script tags. |
| 122 double parser_blocking_load_start_time_; | 122 double parser_blocking_load_start_time_; |
| 123 | 123 |
| 124 Member<PendingScriptClient> client_; | 124 Member<PendingScriptClient> client_; |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace blink | 127 } // namespace blink |
| 128 | 128 |
| 129 #endif // PendingScript_h | 129 #endif // PendingScript_h |
| OLD | NEW |