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

Side by Side Diff: components/devtools_http_handler/devtools_http_handler.cc

Issue 2047833002: DevTools: introduce browser domain for basic target discovery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 server_wrapper_(server_wrapper), 270 server_wrapper_(server_wrapper),
271 connection_id_(connection_id), 271 connection_id_(connection_id),
272 agent_host_(agent_host) { 272 agent_host_(agent_host) {
273 DCHECK_CURRENTLY_ON(BrowserThread::UI); 273 DCHECK_CURRENTLY_ON(BrowserThread::UI);
274 agent_host_->AttachClient(this); 274 agent_host_->AttachClient(this);
275 } 275 }
276 276
277 ~DevToolsAgentHostClientImpl() override { 277 ~DevToolsAgentHostClientImpl() override {
278 DCHECK_CURRENTLY_ON(BrowserThread::UI); 278 DCHECK_CURRENTLY_ON(BrowserThread::UI);
279 if (agent_host_.get()) 279 if (agent_host_.get())
280 agent_host_->DetachClient(); 280 agent_host_->DetachClient(this);
281 } 281 }
282 282
283 void AgentHostClosed(DevToolsAgentHost* agent_host, 283 void AgentHostClosed(DevToolsAgentHost* agent_host,
284 bool replaced_with_another_client) override { 284 bool replaced_with_another_client) override {
285 DCHECK_CURRENTLY_ON(BrowserThread::UI); 285 DCHECK_CURRENTLY_ON(BrowserThread::UI);
286 DCHECK(agent_host == agent_host_.get()); 286 DCHECK(agent_host == agent_host_.get());
287 287
288 std::string message = base::StringPrintf( 288 std::string message = base::StringPrintf(
289 "{ \"method\": \"Inspector.detached\", " 289 "{ \"method\": \"Inspector.detached\", "
290 "\"params\": { \"reason\": \"%s\"} }", 290 "\"params\": { \"reason\": \"%s\"} }",
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 id.c_str(), 930 id.c_str(),
931 host); 931 host);
932 dictionary->SetString( 932 dictionary->SetString(
933 kTargetDevtoolsFrontendUrlField, devtools_frontend_url); 933 kTargetDevtoolsFrontendUrlField, devtools_frontend_url);
934 } 934 }
935 935
936 return dictionary; 936 return dictionary;
937 } 937 }
938 938
939 } // namespace devtools_http_handler 939 } // namespace devtools_http_handler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698