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

Side by Side Diff: content/browser/devtools/devtools_session.cc

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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/devtools/devtools_session.h" 5 #include "content/browser/devtools/devtools_session.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "content/browser/devtools/devtools_agent_host_impl.h"
10 #include "content/browser/devtools/devtools_manager.h" 9 #include "content/browser/devtools/devtools_manager.h"
11 #include "content/browser/devtools/protocol/protocol.h" 10 #include "content/browser/devtools/protocol/protocol.h"
12 #include "content/public/browser/devtools_manager_delegate.h" 11 #include "content/public/browser/devtools_manager_delegate.h"
13 12
14 namespace content { 13 namespace content {
15 14
16 DevToolsSession::DevToolsSession(DevToolsAgentHostImpl* agent_host, 15 DevToolsSession::DevToolsSession(DevToolsAgentHostImpl* agent_host,
17 DevToolsAgentHostClient* client, 16 DevToolsAgentHostClient* client,
18 int session_id) 17 int session_id)
19 : agent_host_(agent_host), 18 : agent_host_(agent_host),
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 88 }
90 89
91 void DevToolsSession::sendProtocolNotification( 90 void DevToolsSession::sendProtocolNotification(
92 std::unique_ptr<protocol::Serializable> message) { 91 std::unique_ptr<protocol::Serializable> message) {
93 agent_host_->SendMessageToClient(session_id_, message->serialize()); 92 agent_host_->SendMessageToClient(session_id_, message->serialize());
94 } 93 }
95 94
96 void DevToolsSession::flushProtocolNotifications() { 95 void DevToolsSession::flushProtocolNotifications() {
97 } 96 }
98 97
99 protocol::DevToolsDomainHandler* DevToolsSession::GetHandlerByName(
100 const std::string& name) {
101 auto it = handlers_.find(name);
102 if (it == handlers_.end())
103 return nullptr;
104 return it->second.get();
105 }
106
107 } // namespace content 98 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_session.h ('k') | content/browser/devtools/protocol/devtools_domain_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698