| 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/inspector/ConsoleTypes.h" | 10 #include "core/inspector/ConsoleTypes.h" |
| 10 #include "core/workers/WorkerLoaderProxy.h" | 11 #include "core/workers/WorkerLoaderProxy.h" |
| 11 #include "wtf/Forward.h" | 12 #include "wtf/Forward.h" |
| 12 | 13 |
| 13 namespace blink { | 14 namespace blink { |
| 14 | 15 |
| 15 class ExecutionContext; | 16 class ExecutionContext; |
| 16 class ParentFrameTaskRunners; | 17 class ParentFrameTaskRunners; |
| 17 class SourceLocation; | 18 class SourceLocation; |
| 18 class WorkerInspectorProxy; | 19 class WorkerInspectorProxy; |
| 19 class WorkerLoaderProxy; | 20 class WorkerLoaderProxy; |
| 20 class WorkerThread; | 21 class WorkerThread; |
| 21 class WorkerThreadStartupData; | 22 class WorkerThreadStartupData; |
| 22 | 23 |
| 23 class CORE_EXPORT ThreadedMessagingProxyBase | 24 class CORE_EXPORT ThreadedMessagingProxyBase |
| 24 : private WorkerLoaderProxyProvider { | 25 : private WorkerLoaderProxyProvider { |
| 25 public: | 26 public: |
| 26 void terminateGlobalScope(); | 27 void terminateGlobalScope(); |
| 27 | 28 |
| 28 virtual void workerThreadCreated(); | 29 virtual void workerThreadCreated(); |
| 29 | 30 |
| 30 // This method should be called in the destructor of the object which | 31 // This method should be called in the destructor of the object which |
| 31 // initially created it. This object could either be a Worker or a Worklet. | 32 // initially created it. This object could either be a Worker or a Worklet. |
| 32 virtual void parentObjectDestroyed(); | 33 virtual void parentObjectDestroyed(); |
| 33 | 34 |
| 35 void countFeature(UseCounter::Feature); |
| 36 void countDeprecation(UseCounter::Feature); |
| 37 |
| 34 void reportConsoleMessage(MessageSource, | 38 void reportConsoleMessage(MessageSource, |
| 35 MessageLevel, | 39 MessageLevel, |
| 36 const String& message, | 40 const String& message, |
| 37 std::unique_ptr<SourceLocation>); | 41 std::unique_ptr<SourceLocation>); |
| 38 void postMessageToPageInspector(const String&); | 42 void postMessageToPageInspector(const String&); |
| 39 | 43 |
| 40 // 'virtual' for testing. | 44 // 'virtual' for testing. |
| 41 virtual void workerThreadTerminated(); | 45 virtual void workerThreadTerminated(); |
| 42 | 46 |
| 43 ExecutionContext* getExecutionContext() const { | 47 ExecutionContext* getExecutionContext() const { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 96 |
| 93 RefPtr<WorkerLoaderProxy> m_loaderProxy; | 97 RefPtr<WorkerLoaderProxy> m_loaderProxy; |
| 94 | 98 |
| 95 bool m_mayBeDestroyed; | 99 bool m_mayBeDestroyed; |
| 96 bool m_askedToTerminate; | 100 bool m_askedToTerminate; |
| 97 }; | 101 }; |
| 98 | 102 |
| 99 } // namespace blink | 103 } // namespace blink |
| 100 | 104 |
| 101 #endif // ThreadedMessagingProxyBase_h | 105 #endif // ThreadedMessagingProxyBase_h |
| OLD | NEW |