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

Side by Side Diff: third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h

Issue 2715803004: Introduce ThreadableLoadingContext: make threaded loading code one step away from Document (Closed)
Patch Set: . Created 3 years, 9 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 ThreadedMessagingProxyBase_h 5 #ifndef ThreadedMessagingProxyBase_h
6 #define ThreadedMessagingProxyBase_h 6 #define ThreadedMessagingProxyBase_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/frame/UseCounter.h" 9 #include "core/frame/UseCounter.h"
10 #include "core/inspector/ConsoleTypes.h" 10 #include "core/inspector/ConsoleTypes.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 bool isParentContextThread() const; 78 bool isParentContextThread() const;
79 79
80 // WorkerLoaderProxyProvider 80 // WorkerLoaderProxyProvider
81 // These methods are called on different threads to schedule loading 81 // These methods are called on different threads to schedule loading
82 // requests and to send callbacks back to WorkerGlobalScope. 82 // requests and to send callbacks back to WorkerGlobalScope.
83 void postTaskToLoader(const WebTraceLocation&, 83 void postTaskToLoader(const WebTraceLocation&,
84 std::unique_ptr<WTF::CrossThreadClosure>) override; 84 std::unique_ptr<WTF::CrossThreadClosure>) override;
85 void postTaskToWorkerGlobalScope( 85 void postTaskToWorkerGlobalScope(
86 const WebTraceLocation&, 86 const WebTraceLocation&,
87 std::unique_ptr<WTF::CrossThreadClosure>) override; 87 std::unique_ptr<WTF::CrossThreadClosure>) override;
88 ExecutionContext* getLoaderExecutionContext() override; 88 ThreadableLoadingContext* getThreadableLoadingContext() override;
89 89
90 private: 90 private:
91 friend class InProcessWorkerMessagingProxyForTest; 91 friend class InProcessWorkerMessagingProxyForTest;
92 friend class ThreadedWorkletMessagingProxyForTest; 92 friend class ThreadedWorkletMessagingProxyForTest;
93 93
94 void parentObjectDestroyedInternal(); 94 void parentObjectDestroyedInternal();
95 95
96 Persistent<ExecutionContext> m_executionContext; 96 Persistent<ExecutionContext> m_executionContext;
97 Persistent<ThreadableLoadingContext> m_loadingContext;
97 Persistent<WorkerInspectorProxy> m_workerInspectorProxy; 98 Persistent<WorkerInspectorProxy> m_workerInspectorProxy;
98 // Accessed cross-thread when worker thread posts tasks to the parent. 99 // Accessed cross-thread when worker thread posts tasks to the parent.
99 CrossThreadPersistent<ParentFrameTaskRunners> m_parentFrameTaskRunners; 100 CrossThreadPersistent<ParentFrameTaskRunners> m_parentFrameTaskRunners;
100 101
101 std::unique_ptr<WorkerThread> m_workerThread; 102 std::unique_ptr<WorkerThread> m_workerThread;
102 103
103 RefPtr<WorkerLoaderProxy> m_loaderProxy; 104 RefPtr<WorkerLoaderProxy> m_loaderProxy;
104 105
105 bool m_mayBeDestroyed; 106 bool m_mayBeDestroyed;
106 bool m_askedToTerminate; 107 bool m_askedToTerminate;
107 }; 108 };
108 109
109 } // namespace blink 110 } // namespace blink
110 111
111 #endif // ThreadedMessagingProxyBase_h 112 #endif // ThreadedMessagingProxyBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698