Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Unified Diff: third_party/WebKit/Source/web/WebDevToolsAgentImpl.h

Issue 1899933003: [DevTools] Introduce InspectorSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: export, comment Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebDevToolsAgentImpl.h
diff --git a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.h b/third_party/WebKit/Source/web/WebDevToolsAgentImpl.h
index e2c9d2629afa1076dfda78865fd8d6731dbb6ffd..c2c2b8eee6e1726366c566a92e4f8fe6ee044573 100644
--- a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.h
+++ b/third_party/WebKit/Source/web/WebDevToolsAgentImpl.h
@@ -33,9 +33,9 @@
#include "core/inspector/InspectorPageAgent.h"
#include "core/inspector/InspectorRuntimeAgent.h"
+#include "core/inspector/InspectorSession.h"
#include "core/inspector/InspectorTracingAgent.h"
#include "platform/heap/Handle.h"
-#include "platform/inspector_protocol/FrontendChannel.h"
#include "public/platform/WebSize.h"
#include "public/platform/WebThread.h"
#include "public/web/WebDevToolsAgent.h"
@@ -77,7 +77,7 @@ class WebDevToolsAgentImpl final
, public InspectorTracingAgent::Client
, public InspectorPageAgent::Client
, public InspectorRuntimeAgent::Client
- , public protocol::FrontendChannel
+ , public InspectorSession::Client
, private WebThread::TaskObserver {
public:
static WebDevToolsAgentImpl* create(WebLocalFrameImpl*, WebDevToolsAgentClient*);
@@ -128,24 +128,23 @@ private:
void setPausedInDebuggerMessage(const String&) override;
void waitForCreateWindow(LocalFrame*) override;
- // protocol::FrontendChannel implementation.
- void sendProtocolResponse(int sessionId, int callId, PassOwnPtr<protocol::DictionaryValue> message) override;
- void sendProtocolNotification(PassOwnPtr<protocol::DictionaryValue> message) override;
- void flush() override;
+ // InspectorSession::Client implementation.
+ void sendProtocolMessage(int sessionId, int callId, const String& response, const String& state) override;
// WebThread::TaskObserver implementation.
void willProcessTask() override;
void didProcessTask() override;
- void initializeAgents();
- void destroyAgents();
+ void initializeSession(int sessionId, const String& hostId);
+ void destroySession();
friend class WebDevToolsAgent;
static void runDebuggerTask(int sessionId, PassOwnPtr<WebDevToolsAgent::MessageDescriptor>);
+ bool attached() const { return m_session.get(); }
+
WebDevToolsAgentClient* m_client;
Member<WebLocalFrameImpl> m_webLocalFrameImpl;
- bool m_attached;
#if DCHECK_IS_ON()
bool m_hasBeenDisposed;
#endif
@@ -163,16 +162,8 @@ private:
Member<InspectorLayerTreeAgent> m_layerTreeAgent;
Member<InspectorTracingAgent> m_tracingAgent;
- OwnPtr<protocol::Dispatcher> m_inspectorBackendDispatcher;
- OwnPtr<protocol::Frontend> m_inspectorFrontend;
- InspectorAgentRegistry m_agents;
+ Member<InspectorSession> m_session;
bool m_includeViewAgents;
-
- typedef Vector<std::pair<int, OwnPtr<protocol::Value>>> NotificationQueue;
- NotificationQueue m_notificationQueue;
- int m_sessionId;
- String m_stateCookie;
- bool m_stateMuted;
int m_layerTreeId;
};

Powered by Google App Engine
This is Rietveld 408576698