| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "core/inspector/InspectorConsoleAgent.h" | 35 #include "core/inspector/InspectorConsoleAgent.h" |
| 36 #include "wtf/PassOwnPtr.h" | 36 #include "wtf/PassOwnPtr.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class ConsoleMessage; | 40 class ConsoleMessage; |
| 41 class ConsoleMessageStorage; | 41 class ConsoleMessageStorage; |
| 42 class InspectedFrames; | 42 class InspectedFrames; |
| 43 class InspectorDOMAgent; | 43 class InspectorDOMAgent; |
| 44 class WorkerInspectorProxy; | |
| 45 class WorkerGlobalScopeProxy; | |
| 46 | 44 |
| 47 class CORE_EXPORT PageConsoleAgent final : public InspectorConsoleAgent { | 45 class CORE_EXPORT PageConsoleAgent final : public InspectorConsoleAgent { |
| 48 WTF_MAKE_NONCOPYABLE(PageConsoleAgent); | 46 WTF_MAKE_NONCOPYABLE(PageConsoleAgent); |
| 49 public: | 47 public: |
| 50 PageConsoleAgent(V8InspectorSession*, InspectorDOMAgent*, InspectedFrames*); | 48 PageConsoleAgent(V8InspectorSession*, InspectorDOMAgent*, InspectedFrames*); |
| 51 ~PageConsoleAgent() override; | 49 ~PageConsoleAgent() override; |
| 52 DECLARE_VIRTUAL_TRACE(); | 50 DECLARE_VIRTUAL_TRACE(); |
| 53 | 51 |
| 54 void enable(ErrorString*) override; | 52 void enable(ErrorString*) override; |
| 55 void disable(ErrorString*) override; | 53 void disable(ErrorString*) override; |
| 56 | 54 |
| 57 void workerTerminated(WorkerInspectorProxy*); | |
| 58 void workerConsoleAgentEnabled(WorkerInspectorProxy*); | |
| 59 | |
| 60 void consoleMessagesCleared() override; | 55 void consoleMessagesCleared() override; |
| 61 | 56 |
| 62 protected: | 57 protected: |
| 63 ConsoleMessageStorage* messageStorage() override; | 58 ConsoleMessageStorage* messageStorage() override; |
| 64 | 59 |
| 65 void enableStackCapturingIfNeeded() override; | 60 void enableStackCapturingIfNeeded() override; |
| 66 void disableStackCapturingIfNeeded() override; | 61 void disableStackCapturingIfNeeded() override; |
| 67 | 62 |
| 68 private: | 63 private: |
| 69 void clearMessages(ErrorString*) override; | 64 void clearMessages(ErrorString*) override; |
| 70 | 65 |
| 71 Member<InspectorDOMAgent> m_inspectorDOMAgent; | 66 Member<InspectorDOMAgent> m_inspectorDOMAgent; |
| 72 Member<InspectedFrames> m_inspectedFrames; | 67 Member<InspectedFrames> m_inspectedFrames; |
| 73 using WorkerInspectorProxySet = HeapHashSet<Member<WorkerInspectorProxy>>; | |
| 74 WorkerInspectorProxySet m_workersWithEnabledConsole; | |
| 75 | 68 |
| 76 static int s_enabledAgentCount; | 69 static int s_enabledAgentCount; |
| 77 }; | 70 }; |
| 78 | 71 |
| 79 } // namespace blink | 72 } // namespace blink |
| 80 | 73 |
| 81 | 74 |
| 82 #endif // !defined(PageConsoleAgent_h) | 75 #endif // !defined(PageConsoleAgent_h) |
| OLD | NEW |