forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnetwork_inspector.h
39 lines (28 loc) · 927 Bytes
/
network_inspector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef SRC_INSPECTOR_NETWORK_INSPECTOR_H_
#define SRC_INSPECTOR_NETWORK_INSPECTOR_H_
#include "env.h"
#include "network_agent.h"
namespace node {
class Environment;
namespace inspector {
class NetworkInspector {
public:
explicit NetworkInspector(Environment* env,
v8_inspector::V8Inspector* v8_inspector);
~NetworkInspector();
void Wire(protocol::UberDispatcher* dispatcher);
bool canEmit(const std::string& domain);
void emitNotification(const std::string& domain,
const std::string& method,
std::unique_ptr<protocol::DictionaryValue> params);
void Enable();
void Disable();
bool IsEnabled() const { return enabled_; }
private:
bool enabled_;
Environment* env_;
std::unique_ptr<protocol::NetworkAgent> network_agent_;
};
} // namespace inspector
} // namespace node
#endif // SRC_INSPECTOR_NETWORK_INSPECTOR_H_