| 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 14 matching lines...) Expand all Loading... |
| 25 : private WorkerLoaderProxyProvider { | 25 : private WorkerLoaderProxyProvider { |
| 26 public: | 26 public: |
| 27 void TerminateGlobalScope(); | 27 void TerminateGlobalScope(); |
| 28 | 28 |
| 29 virtual void WorkerThreadCreated(); | 29 virtual void WorkerThreadCreated(); |
| 30 | 30 |
| 31 // 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 |
| 32 // 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. |
| 33 virtual void ParentObjectDestroyed(); | 33 virtual void ParentObjectDestroyed(); |
| 34 | 34 |
| 35 // TODO(lunalu): Deprecate UseCounter::Feature by WebFeature. |
| 35 void CountFeature(UseCounter::Feature); | 36 void CountFeature(UseCounter::Feature); |
| 37 void CountFeature(WebFeature feature) { |
| 38 return CountFeature(static_cast<UseCounter::Feature>(feature)); |
| 39 } |
| 36 void CountDeprecation(UseCounter::Feature); | 40 void CountDeprecation(UseCounter::Feature); |
| 41 void CountDeprecation(WebFeature feature) { |
| 42 return CountDeprecation(static_cast<UseCounter::Feature>(feature)); |
| 43 } |
| 37 | 44 |
| 38 void ReportConsoleMessage(MessageSource, | 45 void ReportConsoleMessage(MessageSource, |
| 39 MessageLevel, | 46 MessageLevel, |
| 40 const String& message, | 47 const String& message, |
| 41 std::unique_ptr<SourceLocation>); | 48 std::unique_ptr<SourceLocation>); |
| 42 void PostMessageToPageInspector(const String&); | 49 void PostMessageToPageInspector(const String&); |
| 43 | 50 |
| 44 // 'virtual' for testing. | 51 // 'virtual' for testing. |
| 45 virtual void WorkerThreadTerminated(); | 52 virtual void WorkerThreadTerminated(); |
| 46 | 53 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 105 |
| 99 RefPtr<WorkerLoaderProxy> loader_proxy_; | 106 RefPtr<WorkerLoaderProxy> loader_proxy_; |
| 100 | 107 |
| 101 bool may_be_destroyed_; | 108 bool may_be_destroyed_; |
| 102 bool asked_to_terminate_; | 109 bool asked_to_terminate_; |
| 103 }; | 110 }; |
| 104 | 111 |
| 105 } // namespace blink | 112 } // namespace blink |
| 106 | 113 |
| 107 #endif // ThreadedMessagingProxyBase_h | 114 #endif // ThreadedMessagingProxyBase_h |
| OLD | NEW |