| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 void StartStreamingIfPossible(Document*, ScriptStreamer::Type) override; | 55 void StartStreamingIfPossible(Document*, ScriptStreamer::Type) override; |
| 56 KURL UrlForClassicScript() const 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 void Prefinalize(); | 60 void Prefinalize(); |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 enum ReadyState { | 63 enum ReadyState { |
| 64 // These states are considered "not ready". | 64 // These states are considered "not ready". |
| 65 kInConstructor, |
| 65 kWaitingForResource, | 66 kWaitingForResource, |
| 66 kWaitingForStreaming, | 67 kWaitingForStreaming, |
| 67 // These states are considered "ready". | 68 // These states are considered "ready". |
| 68 kReady, | 69 kReady, |
| 69 kErrorOccurred, | 70 kErrorOccurred, |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 ClassicPendingScript(ScriptElementBase*, | 73 ClassicPendingScript(ScriptElementBase*, |
| 73 ScriptResource*, | 74 ScriptResource*, |
| 74 const TextPosition&); | 75 const TextPosition&); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 95 // This is a temporary flag to confirm that ClassicPendingScript is not | 96 // This is a temporary flag to confirm that ClassicPendingScript is not |
| 96 // touched after its refinalizer call and thus https://crbug.com/715309 | 97 // touched after its refinalizer call and thus https://crbug.com/715309 |
| 97 // doesn't break assumptions. | 98 // doesn't break assumptions. |
| 98 // TODO(hiroshige): Check the state in more general way. | 99 // TODO(hiroshige): Check the state in more general way. |
| 99 bool prefinalizer_called_ = false; | 100 bool prefinalizer_called_ = false; |
| 100 }; | 101 }; |
| 101 | 102 |
| 102 } // namespace blink | 103 } // namespace blink |
| 103 | 104 |
| 104 #endif // PendingScript_h | 105 #endif // PendingScript_h |
| OLD | NEW |