| 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 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 } | 50 } |
| 51 | 51 |
| 52 // Accessed from both the parent thread and the worker. | 52 // Accessed from both the parent thread and the worker. |
| 53 ParentFrameTaskRunners* getParentFrameTaskRunners() { | 53 ParentFrameTaskRunners* getParentFrameTaskRunners() { |
| 54 return m_parentFrameTaskRunners.get(); | 54 return m_parentFrameTaskRunners.get(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 // Number of live messaging proxies, used by leak detection. | 57 // Number of live messaging proxies, used by leak detection. |
| 58 static int proxyCount(); | 58 static int proxyCount(); |
| 59 | 59 |
| 60 void setWorkerThreadForTest(std::unique_ptr<WorkerThread>); |
| 61 |
| 60 protected: | 62 protected: |
| 61 ThreadedMessagingProxyBase(ExecutionContext*); | 63 ThreadedMessagingProxyBase(ExecutionContext*); |
| 62 ~ThreadedMessagingProxyBase() override; | 64 ~ThreadedMessagingProxyBase() override; |
| 63 | 65 |
| 64 void initializeWorkerThread(std::unique_ptr<WorkerThreadStartupData>); | 66 void initializeWorkerThread(std::unique_ptr<WorkerThreadStartupData>); |
| 65 virtual std::unique_ptr<WorkerThread> createWorkerThread( | 67 virtual std::unique_ptr<WorkerThread> createWorkerThread( |
| 66 double originTime) = 0; | 68 double originTime) = 0; |
| 67 | 69 |
| 68 WorkerThread* workerThread() const { return m_workerThread.get(); } | 70 WorkerThread* workerThread() const { return m_workerThread.get(); } |
| 69 | 71 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 105 |
| 104 RefPtr<WorkerLoaderProxy> m_loaderProxy; | 106 RefPtr<WorkerLoaderProxy> m_loaderProxy; |
| 105 | 107 |
| 106 bool m_mayBeDestroyed; | 108 bool m_mayBeDestroyed; |
| 107 bool m_askedToTerminate; | 109 bool m_askedToTerminate; |
| 108 }; | 110 }; |
| 109 | 111 |
| 110 } // namespace blink | 112 } // namespace blink |
| 111 | 113 |
| 112 #endif // ThreadedMessagingProxyBase_h | 114 #endif // ThreadedMessagingProxyBase_h |
| OLD | NEW |