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

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

Issue 2727733002: Implement AudioWorkletProcessor interface (Closed)
Patch Set: Refactored AudioWorkletGlobalScope to centralize V8 operation 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"
11 #include "core/workers/ParentFrameTaskRunners.h" 11 #include "core/workers/ParentFrameTaskRunners.h"
12 #include "core/workers/WorkerLoaderProxy.h" 12 #include "core/workers/WorkerLoaderProxy.h"
13 #include "wtf/Forward.h" 13 #include "wtf/Forward.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class ExecutionContext; 17 class ExecutionContext;
18 class SourceLocation; 18 class SourceLocation;
19 class WorkerInspectorProxy; 19 class WorkerInspectorProxy;
20 class WorkerLoaderProxy; 20 class WorkerLoaderProxy;
21 class WorkerReportingProxy;
nhiroki 2017/03/10 15:30:12 unused?
hongchan 2017/03/15 22:30:17 Done.
21 class WorkerThread; 22 class WorkerThread;
22 class WorkerThreadStartupData; 23 class WorkerThreadStartupData;
23 24
24 class CORE_EXPORT ThreadedMessagingProxyBase 25 class CORE_EXPORT ThreadedMessagingProxyBase
25 : private WorkerLoaderProxyProvider { 26 : private WorkerLoaderProxyProvider {
26 public: 27 public:
27 void terminateGlobalScope(); 28 void terminateGlobalScope();
28 29
29 virtual void workerThreadCreated(); 30 virtual void workerThreadCreated();
30 31
(...skipping 19 matching lines...) Expand all
50 } 51 }
51 52
52 // Accessed from both the parent thread and the worker. 53 // Accessed from both the parent thread and the worker.
53 ParentFrameTaskRunners* getParentFrameTaskRunners() { 54 ParentFrameTaskRunners* getParentFrameTaskRunners() {
54 return m_parentFrameTaskRunners.get(); 55 return m_parentFrameTaskRunners.get();
55 } 56 }
56 57
57 // Number of live messaging proxies, used by leak detection. 58 // Number of live messaging proxies, used by leak detection.
58 static int proxyCount(); 59 static int proxyCount();
59 60
61 void setWorkerThreadForTest(std::unique_ptr<WorkerThread>);
62
60 protected: 63 protected:
61 ThreadedMessagingProxyBase(ExecutionContext*); 64 ThreadedMessagingProxyBase(ExecutionContext*);
62 ~ThreadedMessagingProxyBase() override; 65 ~ThreadedMessagingProxyBase() override;
63 66
64 void initializeWorkerThread(std::unique_ptr<WorkerThreadStartupData>); 67 void initializeWorkerThread(std::unique_ptr<WorkerThreadStartupData>);
65 virtual std::unique_ptr<WorkerThread> createWorkerThread( 68 virtual std::unique_ptr<WorkerThread> createWorkerThread(
66 double originTime) = 0; 69 double originTime) = 0;
67 70
68 WorkerThread* workerThread() const { return m_workerThread.get(); } 71 WorkerThread* workerThread() const { return m_workerThread.get(); }
69 72
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 106
104 RefPtr<WorkerLoaderProxy> m_loaderProxy; 107 RefPtr<WorkerLoaderProxy> m_loaderProxy;
105 108
106 bool m_mayBeDestroyed; 109 bool m_mayBeDestroyed;
107 bool m_askedToTerminate; 110 bool m_askedToTerminate;
108 }; 111 };
109 112
110 } // namespace blink 113 } // namespace blink
111 114
112 #endif // ThreadedMessagingProxyBase_h 115 #endif // ThreadedMessagingProxyBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698