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 "chrome/browser/ui/webui/inspect_ui.h" | 5 #include "chrome/browser/ui/webui/inspect_ui.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
12 #include "base/memory/ref_counted_memory.h" | 12 #include "base/memory/ref_counted_memory.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "chrome/browser/devtools/devtools_window.h" | 17 #include "chrome/browser/devtools/devtools_window.h" |
18 #include "chrome/browser/extensions/extension_service.h" | 18 #include "chrome/browser/extensions/extension_service.h" |
19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" | 20 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" |
21 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 #include "content/public/browser/child_process_data.h" | 23 #include "content/public/browser/child_process_data.h" |
24 #include "content/public/browser/devtools_agent_host.h" | 24 #include "content/public/browser/devtools_agent_host.h" |
25 #include "content/public/browser/devtools_client_host.h" | 25 #include "content/public/browser/devtools_client_host.h" |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 target_data->SetString(kAdbSocketField, page->socket()); | 465 target_data->SetString(kAdbSocketField, page->socket()); |
466 target_data->SetString(kAdbDebugUrlField, page->debug_url()); | 466 target_data->SetString(kAdbDebugUrlField, page->debug_url()); |
467 target_data->SetString(kAdbFrontendUrlField, page->frontend_url()); | 467 target_data->SetString(kAdbFrontendUrlField, page->frontend_url()); |
468 targets.Append(target_data); | 468 targets.Append(target_data); |
469 } | 469 } |
470 | 470 |
471 std::string json_string; | 471 std::string json_string; |
472 base::JSONWriter::Write(&targets, &json_string); | 472 base::JSONWriter::Write(&targets, &json_string); |
473 callback.Run(base::RefCountedString::TakeString(&json_string)); | 473 callback.Run(base::RefCountedString::TakeString(&json_string)); |
474 } | 474 } |
OLD | NEW |