| 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 "content/browser/devtools/devtools_http_handler_impl.h" | 5 #include "content/browser/devtools/devtools_http_handler_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 } | 485 } |
| 486 | 486 |
| 487 if (command == "version") { | 487 if (command == "version") { |
| 488 base::DictionaryValue version; | 488 base::DictionaryValue version; |
| 489 version.SetString("Protocol-Version", | 489 version.SetString("Protocol-Version", |
| 490 WebKit::WebDevToolsAgent::inspectorProtocolVersion()); | 490 WebKit::WebDevToolsAgent::inspectorProtocolVersion()); |
| 491 version.SetString("WebKit-Version", | 491 version.SetString("WebKit-Version", |
| 492 webkit_glue::GetWebKitVersion()); | 492 webkit_glue::GetWebKitVersion()); |
| 493 version.SetString("Browser", | 493 version.SetString("Browser", |
| 494 content::GetContentClient()->GetProduct()); | 494 content::GetContentClient()->GetProduct()); |
| 495 version.SetString("Browser-Revision", |
| 496 content::GetContentClient()->GetProductSCMRevision()); |
| 495 version.SetString("User-Agent", | 497 version.SetString("User-Agent", |
| 496 webkit_glue::GetUserAgent(GURL(kAboutBlankURL))); | 498 webkit_glue::GetUserAgent(GURL(kAboutBlankURL))); |
| 497 SendJson(connection_id, net::HTTP_OK, &version, std::string()); | 499 SendJson(connection_id, net::HTTP_OK, &version, std::string()); |
| 498 return; | 500 return; |
| 499 } | 501 } |
| 500 | 502 |
| 501 if (command == "list") { | 503 if (command == "list") { |
| 502 typedef std::vector<PageInfo> PageList; | 504 typedef std::vector<PageInfo> PageList; |
| 503 PageList page_list; | 505 PageList page_list; |
| 504 | 506 |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 host.c_str(), | 888 host.c_str(), |
| 887 kPageUrlPrefix, | 889 kPageUrlPrefix, |
| 888 id.c_str())); | 890 id.c_str())); |
| 889 std::string devtools_frontend_url = GetFrontendURLInternal( | 891 std::string devtools_frontend_url = GetFrontendURLInternal( |
| 890 id.c_str(), | 892 id.c_str(), |
| 891 host); | 893 host); |
| 892 dictionary->SetString(kTargetDevtoolsFrontendUrlField, devtools_frontend_url); | 894 dictionary->SetString(kTargetDevtoolsFrontendUrlField, devtools_frontend_url); |
| 893 } | 895 } |
| 894 | 896 |
| 895 } // namespace content | 897 } // namespace content |
| OLD | NEW |