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

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

Issue 2522583002: Roll third_party/inspector_protocol to 4ad35c45aca9834b67ec2cb152c816ea1b7ceb48 (Closed)
Patch Set: updated README.chromium Created 4 years, 1 month 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 "content/browser/devtools/devtools_agent_host_impl.h" 7 #include "content/browser/devtools/devtools_agent_host_impl.h"
8 #include "content/browser/devtools/protocol/protocol.h" 8 #include "content/browser/devtools/protocol/protocol.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 DevToolsSession::DevToolsSession( 12 DevToolsSession::DevToolsSession(
13 DevToolsAgentHostImpl* agent_host, 13 DevToolsAgentHostImpl* agent_host,
14 int session_id) 14 int session_id)
15 : agent_host_(agent_host), 15 : agent_host_(agent_host),
16 session_id_(session_id), 16 session_id_(session_id),
17 dispatcher_(new protocol::UberDispatcher(this)) { 17 dispatcher_(new protocol::UberDispatcher(this)) {
18 } 18 }
19 19
20 DevToolsSession::~DevToolsSession() {} 20 DevToolsSession::~DevToolsSession() {}
21 21
22 void DevToolsSession::ResetDispatcher() { 22 void DevToolsSession::ResetDispatcher() {
23 dispatcher_.reset(); 23 dispatcher_.reset();
24 } 24 }
25 25
26 void DevToolsSession::sendProtocolResponse( 26 void DevToolsSession::sendProtocolResponse(
27 int call_id, 27 int call_id,
28 const std::string& message) { 28 std::unique_ptr<protocol::Serializable> message) {
29 agent_host_->SendMessageToClient(session_id_, message); 29 agent_host_->SendMessageToClient(session_id_, message->serialize());
30 } 30 }
31 31
32 void DevToolsSession::sendProtocolNotification(const std::string& message) { 32 void DevToolsSession::sendProtocolNotification(
33 agent_host_->SendMessageToClient(session_id_, message); 33 std::unique_ptr<protocol::Serializable> message) {
34 agent_host_->SendMessageToClient(session_id_, message->serialize());
34 } 35 }
35 36
36 void DevToolsSession::flushProtocolNotifications() { 37 void DevToolsSession::flushProtocolNotifications() {
37 } 38 }
38 39
39 } // namespace content 40 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_session.h ('k') | content/browser/devtools/protocol/tracing_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698