v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8-console-agent-impl.h
Go to the documentation of this file.
1// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_INSPECTOR_V8_CONSOLE_AGENT_IMPL_H_
6#define V8_INSPECTOR_V8_CONSOLE_AGENT_IMPL_H_
7
8#include "src/base/macros.h"
9#include "src/inspector/protocol/Console.h"
10#include "src/inspector/protocol/Forward.h"
11
12namespace v8_inspector {
13
14class V8ConsoleMessage;
15class V8InspectorSessionImpl;
16
17using protocol::Response;
18
19class V8ConsoleAgentImpl : public protocol::Console::Backend {
20 public:
21 V8ConsoleAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*,
22 protocol::DictionaryValue* state);
26
27 Response enable() override;
28 Response disable() override;
29 Response clearMessages() override;
30
31 void restore();
33 void reset();
34 bool enabled();
35
36 private:
37 void reportAllMessages();
38 bool reportMessage(V8ConsoleMessage*, bool generatePreview);
39
41 protocol::DictionaryValue* m_state;
42 protocol::Console::Frontend m_frontend;
44};
45
46} // namespace v8_inspector
47
48#endif // V8_INSPECTOR_V8_CONSOLE_AGENT_IMPL_H_
bool reportMessage(V8ConsoleMessage *, bool generatePreview)
protocol::DictionaryValue * m_state
V8ConsoleAgentImpl(const V8ConsoleAgentImpl &)=delete
V8ConsoleAgentImpl & operator=(const V8ConsoleAgentImpl &)=delete
protocol::Console::Frontend m_frontend
V8ConsoleAgentImpl(V8InspectorSessionImpl *, protocol::FrontendChannel *, protocol::DictionaryValue *state)