| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ClassicPendingScript_h | 5 #ifndef ClassicPendingScript_h |
| 6 #define ClassicPendingScript_h | 6 #define ClassicPendingScript_h |
| 7 | 7 |
| 8 #include "core/dom/ClassicScript.h" | 8 #include "core/dom/ClassicScript.h" |
| 9 #include "core/dom/PendingScript.h" | 9 #include "core/dom/PendingScript.h" |
| 10 #include "core/loader/resource/ScriptResource.h" | 10 #include "core/loader/resource/ScriptResource.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 DECLARE_TRACE(); | 43 DECLARE_TRACE(); |
| 44 | 44 |
| 45 blink::ScriptType GetScriptType() const override { | 45 blink::ScriptType GetScriptType() const override { |
| 46 return blink::ScriptType::kClassic; | 46 return blink::ScriptType::kClassic; |
| 47 } | 47 } |
| 48 | 48 |
| 49 ClassicScript* GetSource(const KURL& document_url, | 49 ClassicScript* GetSource(const KURL& document_url, |
| 50 bool& error_occurred) const override; | 50 bool& error_occurred) const override; |
| 51 bool IsReady() const override; | 51 bool IsReady() const override; |
| 52 KURL Url() const override; | |
| 53 bool IsExternal() const override { return GetResource(); } | 52 bool IsExternal() const override { return GetResource(); } |
| 54 bool ErrorOccurred() const override; | 53 bool ErrorOccurred() const override; |
| 55 bool WasCanceled() const override; | 54 bool WasCanceled() const override; |
| 56 void StartStreamingIfPossible(Document*, ScriptStreamer::Type) override; | 55 void StartStreamingIfPossible(Document*, ScriptStreamer::Type) override; |
| 56 KURL UrlForClassicScript() const override; |
| 57 void RemoveFromMemoryCache() override; | 57 void RemoveFromMemoryCache() override; |
| 58 void DisposeInternal() override; | 58 void DisposeInternal() override; |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 ClassicPendingScript(ScriptElementBase*, | 61 ClassicPendingScript(ScriptElementBase*, |
| 62 ScriptResource*, | 62 ScriptResource*, |
| 63 const TextPosition&, | 63 const TextPosition&, |
| 64 bool is_for_testing = false); | 64 bool is_for_testing = false); |
| 65 ClassicPendingScript() = delete; | 65 ClassicPendingScript() = delete; |
| 66 | 66 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 79 Member<ScriptStreamer> streamer_; | 79 Member<ScriptStreamer> streamer_; |
| 80 | 80 |
| 81 // This flag is used to skip non-null checks of |m_element| in unit | 81 // This flag is used to skip non-null checks of |m_element| in unit |
| 82 // tests, because |m_element| can be null in unit tests. | 82 // tests, because |m_element| can be null in unit tests. |
| 83 const bool is_for_testing_; | 83 const bool is_for_testing_; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace blink | 86 } // namespace blink |
| 87 | 87 |
| 88 #endif // PendingScript_h | 88 #endif // PendingScript_h |
| OLD | NEW |