| 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 WorkletConsole_h | 5 #ifndef WorkletConsole_h |
| 6 #define WorkletConsole_h | 6 #define WorkletConsole_h |
| 7 | 7 |
| 8 #include "core/frame/ConsoleBase.h" | 8 #include "core/frame/ConsoleBase.h" |
| 9 #include "core/frame/ConsoleTypes.h" | 9 #include "core/frame/ConsoleTypes.h" |
| 10 #include "core/inspector/ConsoleAPITypes.h" | 10 #include "core/inspector/ConsoleAPITypes.h" |
| 11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class ConsoleMessage; | 15 class ConsoleMessage; |
| 16 class WorkletGlobalScope; | 16 class WorkletGlobalScope; |
| 17 | 17 |
| 18 class WorkletConsole final : public ConsoleBase { | 18 class WorkletConsole final : public ConsoleBase { |
| 19 DEFINE_WRAPPERTYPEINFO(); | 19 DEFINE_WRAPPERTYPEINFO(); |
| 20 public: | 20 public: |
| 21 static WorkletConsole* create(WorkletGlobalScope* scope) | 21 static WorkletConsole* create(WorkletGlobalScope* scope) |
| 22 { | 22 { |
| 23 return new WorkletConsole(scope); | 23 return new WorkletConsole(scope); |
| 24 } | 24 } |
| 25 ~WorkletConsole() override; | 25 ~WorkletConsole() override; |
| 26 | 26 |
| 27 DECLARE_VIRTUAL_TRACE(); | 27 DECLARE_VIRTUAL_TRACE(); |
| 28 | 28 |
| 29 protected: | |
| 30 ExecutionContext* context() final; | |
| 31 void reportMessageToConsole(ConsoleMessage*) final; | 29 void reportMessageToConsole(ConsoleMessage*) final; |
| 32 | |
| 33 private: | 30 private: |
| 34 explicit WorkletConsole(WorkletGlobalScope*); | 31 explicit WorkletConsole(WorkletGlobalScope*); |
| 35 | 32 |
| 36 Member<WorkletGlobalScope> m_scope; | 33 Member<WorkletGlobalScope> m_scope; |
| 37 }; | 34 }; |
| 38 | 35 |
| 39 } // namespace blink | 36 } // namespace blink |
| 40 | 37 |
| 41 #endif // WorkletConsole_h | 38 #endif // WorkletConsole_h |
| OLD | NEW |