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 "bindings/core/v8/ScriptStreamer.h" | 8 #include "bindings/core/v8/ScriptStreamer.h" |
9 #include "core/dom/ClassicScript.h" | 9 #include "core/dom/ClassicScript.h" |
10 #include "core/dom/PendingScript.h" | 10 #include "core/dom/PendingScript.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 DECLARE_TRACE(); | 49 DECLARE_TRACE(); |
50 | 50 |
51 blink::ScriptType GetScriptType() const override { | 51 blink::ScriptType GetScriptType() const override { |
52 return blink::ScriptType::kClassic; | 52 return blink::ScriptType::kClassic; |
53 } | 53 } |
54 | 54 |
55 ClassicScript* GetSource(const KURL& document_url, | 55 ClassicScript* GetSource(const KURL& document_url, |
56 bool& error_occurred) const override; | 56 bool& error_occurred) const override; |
57 bool IsReady() const override; | 57 bool IsReady() const override; |
58 KURL Url() const override; | |
59 bool IsExternal() const override { return GetResource(); } | 58 bool IsExternal() const override { return GetResource(); } |
60 bool ErrorOccurred() const override; | 59 bool ErrorOccurred() const override; |
61 bool WasCanceled() const override; | 60 bool WasCanceled() const override; |
62 void StartStreamingIfPossible(Document*, ScriptStreamer::Type) override; | 61 void StartStreamingIfPossible(Document*, ScriptStreamer::Type) override; |
| 62 KURL UrlForClassicScript() const override; |
63 void RemoveFromMemoryCache() override; | 63 void RemoveFromMemoryCache() override; |
64 void DisposeInternal() override; | 64 void DisposeInternal() override; |
65 | 65 |
66 // Just used as the prefinalizer, does the same as PendingScript::Dispose(). | 66 // Just used as the prefinalizer, does the same as PendingScript::Dispose(). |
67 // We define Dispose() with NOINLINE in ClassicPendingScript just to make | 67 // We define Dispose() with NOINLINE in ClassicPendingScript just to make |
68 // the prefinalizers of PendingScript and ClassicPendingScript have | 68 // the prefinalizers of PendingScript and ClassicPendingScript have |
69 // different addresses to avoid assertion failures on Windows test bots. | 69 // different addresses to avoid assertion failures on Windows test bots. |
70 void Dispose(); | 70 void Dispose(); |
71 | 71 |
72 private: | 72 private: |
(...skipping 18 matching lines...) Expand all Loading... |
91 Member<ScriptStreamer> streamer_; | 91 Member<ScriptStreamer> streamer_; |
92 | 92 |
93 // This flag is used to skip non-null checks of |m_element| in unit | 93 // This flag is used to skip non-null checks of |m_element| in unit |
94 // tests, because |m_element| can be null in unit tests. | 94 // tests, because |m_element| can be null in unit tests. |
95 const bool is_for_testing_; | 95 const bool is_for_testing_; |
96 }; | 96 }; |
97 | 97 |
98 } // namespace blink | 98 } // namespace blink |
99 | 99 |
100 #endif // PendingScript_h | 100 #endif // PendingScript_h |
OLD | NEW |