| OLD | NEW |
| 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 19 matching lines...) Expand all Loading... |
| 30 #include "content/public/common/url_constants.h" | 30 #include "content/public/common/url_constants.h" |
| 31 #include "content/public/common/user_agent.h" | 31 #include "content/public/common/user_agent.h" |
| 32 #include "net/base/escape.h" | 32 #include "net/base/escape.h" |
| 33 #include "net/base/io_buffer.h" | 33 #include "net/base/io_buffer.h" |
| 34 #include "net/base/ip_endpoint.h" | 34 #include "net/base/ip_endpoint.h" |
| 35 #include "net/base/net_errors.h" | 35 #include "net/base/net_errors.h" |
| 36 #include "net/server/http_server.h" | 36 #include "net/server/http_server.h" |
| 37 #include "net/server/http_server_request_info.h" | 37 #include "net/server/http_server_request_info.h" |
| 38 #include "net/server/http_server_response_info.h" | 38 #include "net/server/http_server_response_info.h" |
| 39 #include "net/socket/server_socket.h" | 39 #include "net/socket/server_socket.h" |
| 40 #include "v8/include/v8.h" |
| 40 | 41 |
| 41 #if defined(OS_ANDROID) | 42 #if defined(OS_ANDROID) |
| 42 #include "base/android/build_info.h" | 43 #include "base/android/build_info.h" |
| 43 #endif | 44 #endif |
| 44 | 45 |
| 45 namespace content { | 46 namespace content { |
| 46 | 47 |
| 47 namespace { | 48 namespace { |
| 48 | 49 |
| 49 const base::FilePath::CharType kDevToolsActivePortFileName[] = | 50 const base::FilePath::CharType kDevToolsActivePortFileName[] = |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 return; | 518 return; |
| 518 } | 519 } |
| 519 | 520 |
| 520 if (command == "version") { | 521 if (command == "version") { |
| 521 base::DictionaryValue version; | 522 base::DictionaryValue version; |
| 522 version.SetString("Protocol-Version", | 523 version.SetString("Protocol-Version", |
| 523 DevToolsAgentHost::GetProtocolVersion().c_str()); | 524 DevToolsAgentHost::GetProtocolVersion().c_str()); |
| 524 version.SetString("WebKit-Version", GetWebKitVersion()); | 525 version.SetString("WebKit-Version", GetWebKitVersion()); |
| 525 version.SetString("Browser", product_name_); | 526 version.SetString("Browser", product_name_); |
| 526 version.SetString("User-Agent", user_agent_); | 527 version.SetString("User-Agent", user_agent_); |
| 528 version.SetString("V8-Version", v8::V8::GetVersion()); |
| 527 #if defined(OS_ANDROID) | 529 #if defined(OS_ANDROID) |
| 528 version.SetString("Android-Package", | 530 version.SetString("Android-Package", |
| 529 base::android::BuildInfo::GetInstance()->package_name()); | 531 base::android::BuildInfo::GetInstance()->package_name()); |
| 530 #endif | 532 #endif |
| 531 SendJson(connection_id, net::HTTP_OK, &version, std::string()); | 533 SendJson(connection_id, net::HTTP_OK, &version, std::string()); |
| 532 return; | 534 return; |
| 533 } | 535 } |
| 534 | 536 |
| 535 if (command == "list") { | 537 if (command == "list") { |
| 536 DevToolsAgentHost::DiscoverAllHosts( | 538 DevToolsAgentHost::DiscoverAllHosts( |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 id.c_str(), | 856 id.c_str(), |
| 855 host); | 857 host); |
| 856 dictionary->SetString( | 858 dictionary->SetString( |
| 857 kTargetDevtoolsFrontendUrlField, devtools_frontend_url); | 859 kTargetDevtoolsFrontendUrlField, devtools_frontend_url); |
| 858 } | 860 } |
| 859 | 861 |
| 860 return dictionary; | 862 return dictionary; |
| 861 } | 863 } |
| 862 | 864 |
| 863 } // namespace content | 865 } // namespace content |
| OLD | NEW |