OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 UnderlyingSourceBase_h | 5 #ifndef UnderlyingSourceBase_h |
6 #define UnderlyingSourceBase_h | 6 #define UnderlyingSourceBase_h |
7 | 7 |
8 #include "bindings/core/v8/ActiveScriptWrappable.h" | 8 #include "bindings/core/v8/ActiveScriptWrappable.h" |
9 #include "bindings/core/v8/ScriptPromise.h" | 9 #include "bindings/core/v8/ScriptPromise.h" |
10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 void notifyLockReleased(); | 43 void notifyLockReleased(); |
44 | 44 |
45 // ScriptWrappable | 45 // ScriptWrappable |
46 bool hasPendingActivity() const; | 46 bool hasPendingActivity() const; |
47 | 47 |
48 // SuspendableObject | 48 // SuspendableObject |
49 void contextDestroyed() override; | 49 void contextDestroyed() override; |
50 | 50 |
51 protected: | 51 protected: |
52 explicit UnderlyingSourceBase(ScriptState* scriptState) | 52 explicit UnderlyingSourceBase(ScriptState* scriptState) |
53 : ActiveScriptWrappable<UnderlyingSourceBase>(this), | 53 : SuspendableObject(scriptState->getExecutionContext()) { |
54 SuspendableObject(scriptState->getExecutionContext()) { | |
55 this->suspendIfNeeded(); | 54 this->suspendIfNeeded(); |
56 } | 55 } |
57 | 56 |
58 ReadableStreamController* controller() const { return m_controller; } | 57 ReadableStreamController* controller() const { return m_controller; } |
59 | 58 |
60 private: | 59 private: |
61 Member<ReadableStreamController> m_controller; | 60 Member<ReadableStreamController> m_controller; |
62 bool m_isStreamLocked = false; | 61 bool m_isStreamLocked = false; |
63 }; | 62 }; |
64 | 63 |
65 } // namespace blink | 64 } // namespace blink |
66 | 65 |
67 #endif // UnderlyingSourceBase_h | 66 #endif // UnderlyingSourceBase_h |
OLD | NEW |