| OLD | NEW |
| 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 "chrome/browser/devtools/chrome_devtools_manager_delegate.h" | 5 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 return DevToolsAgentHost::kTypeFrame; | 358 return DevToolsAgentHost::kTypeFrame; |
| 359 | 359 |
| 360 for (TabContentsIterator it; !it.done(); it.Next()) { | 360 for (TabContentsIterator it; !it.done(); it.Next()) { |
| 361 if (*it == web_contents) | 361 if (*it == web_contents) |
| 362 return DevToolsAgentHost::kTypePage; | 362 return DevToolsAgentHost::kTypePage; |
| 363 } | 363 } |
| 364 | 364 |
| 365 std::string extension_name; | 365 std::string extension_name; |
| 366 std::string extension_type; | 366 std::string extension_type; |
| 367 if (!GetExtensionInfo(host, &extension_name, &extension_type)) | 367 if (!GetExtensionInfo(host, &extension_name, &extension_type)) |
| 368 return std::string(); | 368 return DevToolsAgentHost::kTypeOther; |
| 369 return extension_type; | 369 return extension_type; |
| 370 } | 370 } |
| 371 | 371 |
| 372 std::string ChromeDevToolsManagerDelegate::GetTargetTitle( | 372 std::string ChromeDevToolsManagerDelegate::GetTargetTitle( |
| 373 content::RenderFrameHost* host) { | 373 content::RenderFrameHost* host) { |
| 374 std::string extension_name; | 374 std::string extension_name; |
| 375 std::string extension_type; | 375 std::string extension_type; |
| 376 if (!GetExtensionInfo(host, &extension_name, &extension_type)) | 376 if (!GetExtensionInfo(host, &extension_name, &extension_type)) |
| 377 return std::string(); | 377 return std::string(); |
| 378 return extension_name; | 378 return extension_name; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 kLocationsParam); | 503 kLocationsParam); |
| 504 } | 504 } |
| 505 tcp_locations.insert(net::HostPortPair(host, port)); | 505 tcp_locations.insert(net::HostPortPair(host, port)); |
| 506 } | 506 } |
| 507 | 507 |
| 508 host_data_[agent_host]->set_remote_locations(tcp_locations); | 508 host_data_[agent_host]->set_remote_locations(tcp_locations); |
| 509 UpdateDeviceDiscovery(); | 509 UpdateDeviceDiscovery(); |
| 510 | 510 |
| 511 return DevToolsProtocol::CreateSuccessResponse(command_id, nullptr); | 511 return DevToolsProtocol::CreateSuccessResponse(command_id, nullptr); |
| 512 } | 512 } |
| OLD | NEW |