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

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

Issue 2514933003: DevTools: enable target domain handler on the browser target, make browser target non-discoverable.
Patch Set: rebaselined Created 3 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser_devtools_agent_host.h" 5 #include "content/browser/devtools/browser_devtools_agent_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "content/browser/devtools/devtools_session.h" 10 #include "content/browser/devtools/devtools_session.h"
(...skipping 28 matching lines...) Expand all
39 tethering_task_runner_(tethering_task_runner), 39 tethering_task_runner_(tethering_task_runner),
40 socket_callback_(socket_callback), 40 socket_callback_(socket_callback),
41 only_discovery_(only_discovery) { 41 only_discovery_(only_discovery) {
42 NotifyCreated(); 42 NotifyCreated();
43 } 43 }
44 44
45 BrowserDevToolsAgentHost::~BrowserDevToolsAgentHost() { 45 BrowserDevToolsAgentHost::~BrowserDevToolsAgentHost() {
46 } 46 }
47 47
48 void BrowserDevToolsAgentHost::AttachSession(DevToolsSession* session) { 48 void BrowserDevToolsAgentHost::AttachSession(DevToolsSession* session) {
49 if (only_discovery_) { 49 session->AddHandler(base::WrapUnique(new protocol::TargetHandler()));
50 session->AddHandler(base::WrapUnique(new protocol::TargetHandler())); 50
51 if (only_discovery_)
51 return; 52 return;
52 }
53 53
54 session->AddHandler(base::WrapUnique(new protocol::IOHandler( 54 session->AddHandler(base::WrapUnique(new protocol::IOHandler(
55 GetIOContext()))); 55 GetIOContext())));
56 session->AddHandler(base::WrapUnique(new protocol::MemoryHandler())); 56 session->AddHandler(base::WrapUnique(new protocol::MemoryHandler()));
57 session->AddHandler(base::WrapUnique(new protocol::SystemInfoHandler())); 57 session->AddHandler(base::WrapUnique(new protocol::SystemInfoHandler()));
58 session->AddHandler(base::WrapUnique(new protocol::TetheringHandler( 58 session->AddHandler(base::WrapUnique(new protocol::TetheringHandler(
59 socket_callback_, tethering_task_runner_))); 59 socket_callback_, tethering_task_runner_)));
60 session->AddHandler(base::WrapUnique(new protocol::TracingHandler( 60 session->AddHandler(base::WrapUnique(new protocol::TracingHandler(
61 protocol::TracingHandler::Browser, 61 protocol::TracingHandler::Browser,
62 FrameTreeNode::kFrameTreeNodeInvalidId, 62 FrameTreeNode::kFrameTreeNodeInvalidId,
(...skipping 29 matching lines...) Expand all
92 bool BrowserDevToolsAgentHost::DispatchProtocolMessage( 92 bool BrowserDevToolsAgentHost::DispatchProtocolMessage(
93 DevToolsSession* session, 93 DevToolsSession* session,
94 const std::string& message) { 94 const std::string& message) {
95 int call_id; 95 int call_id;
96 std::string method; 96 std::string method;
97 session->Dispatch(message, &call_id, &method); 97 session->Dispatch(message, &call_id, &method);
98 return true; 98 return true;
99 } 99 }
100 100
101 } // content 101 } // content
OLDNEW
« no previous file with comments | « chrome/browser/devtools/device/port_forwarding_controller.cc ('k') | content/browser/devtools/devtools_http_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698