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

Unified Diff: content/browser/devtools/devtools_agent_host_impl.h

Issue 2863623003: [DevTools] Support multiple sessions in content/ domain handlers (Closed)
Patch Set: addressed review comments Created 3 years, 7 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
« no previous file with comments | « no previous file | content/browser/devtools/devtools_agent_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/devtools_agent_host_impl.h
diff --git a/content/browser/devtools/devtools_agent_host_impl.h b/content/browser/devtools/devtools_agent_host_impl.h
index aa54dfd6250bd97d7946424d9825265138d7d773..bf946bca86f4fdc03cbdb2479a88f913df1b6176 100644
--- a/content/browser/devtools/devtools_agent_host_impl.h
+++ b/content/browser/devtools/devtools_agent_host_impl.h
@@ -10,6 +10,7 @@
#include <string>
#include "base/compiler_specific.h"
+#include "base/containers/flat_set.h"
#include "content/browser/devtools/devtools_io_context.h"
#include "content/common/content_export.h"
#include "content/common/devtools_messages.h"
@@ -20,10 +21,6 @@ namespace content {
class BrowserContext;
class DevToolsSession;
-namespace protocol {
-class DevToolsDomainHandler;
-}
-
// Describes interface for managing devtools agents from the browser process.
class CONTENT_EXPORT DevToolsAgentHostImpl : public DevToolsAgentHost {
public:
@@ -67,11 +64,11 @@ class CONTENT_EXPORT DevToolsAgentHostImpl : public DevToolsAgentHost {
DevToolsIOContext* GetIOContext() { return &io_context_; }
// TODO(dgozman): remove this accessor.
- DevToolsSession* session() { return session_.get(); }
+ DevToolsSession* session() { return session_; }
private:
friend class DevToolsAgentHost; // for static methods
- friend class protocol::DevToolsDomainHandler;
+ friend class DevToolsSession;
bool InnerAttachClient(DevToolsAgentHostClient* client, bool force);
void InnerDetachClient();
void NotifyAttached();
@@ -80,7 +77,9 @@ class CONTENT_EXPORT DevToolsAgentHostImpl : public DevToolsAgentHost {
const std::string id_;
int last_session_id_;
- std::unique_ptr<DevToolsSession> session_;
+ // TODO(dgozman): remove this together with accessor above.
+ DevToolsSession* session_;
+ base::flat_set<std::unique_ptr<DevToolsSession>> sessions_;
DevToolsIOContext io_context_;
static int s_attached_count_;
static int s_force_creation_count_;
« no previous file with comments | « no previous file | content/browser/devtools/devtools_agent_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698