| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "core/inspector/InspectorBaseAgent.h" | 29 #include "core/inspector/InspectorBaseAgent.h" |
| 30 #include "wtf/Forward.h" | 30 #include "wtf/Forward.h" |
| 31 #include "wtf/Noncopyable.h" | 31 #include "wtf/Noncopyable.h" |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 class ConsoleMessage; | 35 class ConsoleMessage; |
| 36 class ConsoleMessageStorage; | 36 class ConsoleMessageStorage; |
| 37 class V8InspectorSession; | 37 class V8InspectorSession; |
| 38 | 38 |
| 39 class CORE_EXPORT InspectorConsoleAgent : public InspectorBaseAgent<InspectorCon
soleAgent, protocol::Console::Frontend>, public protocol::Console::Backend { | 39 class CORE_EXPORT InspectorConsoleAgent : public InspectorBaseAgent<protocol::Co
nsole::Metainfo> { |
| 40 WTF_MAKE_NONCOPYABLE(InspectorConsoleAgent); | 40 WTF_MAKE_NONCOPYABLE(InspectorConsoleAgent); |
| 41 public: | 41 public: |
| 42 ~InspectorConsoleAgent() override; | 42 ~InspectorConsoleAgent() override; |
| 43 | 43 |
| 44 void enable(ErrorString*) override; | 44 void enable(ErrorString*) override; |
| 45 bool enabled() { return m_enabled; } | 45 bool enabled() { return m_enabled; } |
| 46 | 46 |
| 47 void disable(ErrorString*) override; | 47 void disable(ErrorString*) override; |
| 48 void restore() final; | 48 void restore() final; |
| 49 | 49 |
| 50 void addMessageToConsole(ConsoleMessage*); | 50 void addMessageToConsole(ConsoleMessage*); |
| 51 virtual void consoleMessagesCleared(); | 51 virtual void consoleMessagesCleared(); |
| 52 | 52 |
| 53 protected: | 53 protected: |
| 54 explicit InspectorConsoleAgent(V8InspectorSession*); | 54 explicit InspectorConsoleAgent(V8InspectorSession*); |
| 55 void sendConsoleMessageToFrontend(ConsoleMessage*, bool generatePreview, dou
ble* timestamp = nullptr); | 55 void sendConsoleMessageToFrontend(ConsoleMessage*, bool generatePreview, dou
ble* timestamp = nullptr); |
| 56 virtual ConsoleMessageStorage* messageStorage() = 0; | 56 virtual ConsoleMessageStorage* messageStorage() = 0; |
| 57 | 57 |
| 58 virtual void enableStackCapturingIfNeeded() = 0; | 58 virtual void enableStackCapturingIfNeeded() = 0; |
| 59 virtual void disableStackCapturingIfNeeded() = 0; | 59 virtual void disableStackCapturingIfNeeded() = 0; |
| 60 | 60 |
| 61 V8InspectorSession* m_v8Session; | 61 V8InspectorSession* m_v8Session; |
| 62 bool m_enabled; | 62 bool m_enabled; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace blink | 65 } // namespace blink |
| 66 | 66 |
| 67 | 67 |
| 68 #endif // !defined(InspectorConsoleAgent_h) | 68 #endif // !defined(InspectorConsoleAgent_h) |
| OLD | NEW |