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

Side by Side Diff: components/devtools_discovery/devtools_discovery_manager.cc

Issue 2289773002: Revert of DevTools: merge devtools target with devtools host, part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/devtools_discovery/devtools_discovery_manager.h" 5 #include "components/devtools_discovery/devtools_discovery_manager.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "components/devtools_discovery/basic_target_descriptor.h" 8 #include "components/devtools_discovery/basic_target_descriptor.h"
9 #include "content/public/browser/devtools_agent_host.h" 9 #include "content/public/browser/devtools_agent_host.h"
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 command_dict->GetDictionary("params", &params_dict) && 75 command_dict->GetDictionary("params", &params_dict) &&
76 params_dict->GetString("url", &url)) { 76 params_dict->GetString("url", &url)) {
77 std::unique_ptr<devtools_discovery::DevToolsTargetDescriptor> descriptor = 77 std::unique_ptr<devtools_discovery::DevToolsTargetDescriptor> descriptor =
78 CreateNew(GURL(url)); 78 CreateNew(GURL(url));
79 if (!descriptor) 79 if (!descriptor)
80 return nullptr; 80 return nullptr;
81 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue()); 81 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue());
82 result->SetInteger("id", id); 82 result->SetInteger("id", id);
83 std::unique_ptr<base::DictionaryValue> cmd_result( 83 std::unique_ptr<base::DictionaryValue> cmd_result(
84 new base::DictionaryValue()); 84 new base::DictionaryValue());
85 cmd_result->SetString("targetId", descriptor->GetAgentHost()->GetId()); 85 cmd_result->SetString("targetId", descriptor->GetId());
86 result->Set("result", std::move(cmd_result)); 86 result->Set("result", std::move(cmd_result));
87 return result; 87 return result;
88 } 88 }
89 return nullptr; 89 return nullptr;
90 } 90 }
91 91
92 } // namespace devtools_discovery 92 } // namespace devtools_discovery
OLDNEW
« no previous file with comments | « components/devtools_discovery/basic_target_descriptor.cc ('k') | components/devtools_discovery/devtools_target_descriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698