Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(791)

Side by Side Diff: third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h

Issue 2811863002: Move ScriptState::GetExecutionContext (Part 4) (Closed)
Patch Set: Fix Document.cpp Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "bindings/core/v8/ScriptValue.h" 11 #include "bindings/core/v8/ScriptValue.h"
12 #include "bindings/core/v8/ScriptWrappable.h" 12 #include "bindings/core/v8/ScriptWrappable.h"
13 #include "core/CoreExport.h" 13 #include "core/CoreExport.h"
14 #include "core/dom/ContextLifecycleObserver.h" 14 #include "core/dom/ContextLifecycleObserver.h"
15 #include "core/dom/ExecutionContext.h"
15 #include "platform/heap/GarbageCollected.h" 16 #include "platform/heap/GarbageCollected.h"
16 #include "platform/heap/Handle.h" 17 #include "platform/heap/Handle.h"
17 18
18 namespace blink { 19 namespace blink {
19 20
20 class ReadableStreamController; 21 class ReadableStreamController;
21 22
22 class CORE_EXPORT UnderlyingSourceBase 23 class CORE_EXPORT UnderlyingSourceBase
23 : public GarbageCollectedFinalized<UnderlyingSourceBase>, 24 : public GarbageCollectedFinalized<UnderlyingSourceBase>,
24 public ScriptWrappable, 25 public ScriptWrappable,
(...skipping 18 matching lines...) Expand all
43 void notifyLockReleased(); 44 void notifyLockReleased();
44 45
45 // ScriptWrappable 46 // ScriptWrappable
46 bool HasPendingActivity() const; 47 bool HasPendingActivity() const;
47 48
48 // ContextLifecycleObserver 49 // ContextLifecycleObserver
49 void ContextDestroyed(ExecutionContext*) override; 50 void ContextDestroyed(ExecutionContext*) override;
50 51
51 protected: 52 protected:
52 explicit UnderlyingSourceBase(ScriptState* script_state) 53 explicit UnderlyingSourceBase(ScriptState* script_state)
53 : ContextLifecycleObserver(script_state->GetExecutionContext()) {} 54 : ContextLifecycleObserver(ExecutionContext::From(script_state)) {}
54 55
55 ReadableStreamController* Controller() const { return controller_; } 56 ReadableStreamController* Controller() const { return controller_; }
56 57
57 private: 58 private:
58 Member<ReadableStreamController> controller_; 59 Member<ReadableStreamController> controller_;
59 bool is_stream_locked_ = false; 60 bool is_stream_locked_ = false;
60 }; 61 };
61 62
62 } // namespace blink 63 } // namespace blink
63 64
64 #endif // UnderlyingSourceBase_h 65 #endif // UnderlyingSourceBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698