| 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 // Implements the Chrome Extensions Debugger API. | 5 // Implements the Chrome Extensions Debugger API. |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/api/debugger/debugger_api.h" | 7 #include "chrome/browser/extensions/api/debugger/debugger_api.h" |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| 11 | 11 |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/json/json_reader.h" | 13 #include "base/json/json_reader.h" |
| 14 #include "base/json/json_writer.h" | 14 #include "base/json/json_writer.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/singleton.h" | 16 #include "base/memory/singleton.h" |
| 17 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
| 18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 20 #include "base/values.h" | 20 #include "base/values.h" |
| 21 #include "chrome/browser/chrome_notification_types.h" | 21 #include "chrome/browser/chrome_notification_types.h" |
| 22 #include "chrome/browser/devtools/devtools_target_impl.h" | 22 #include "chrome/browser/devtools/devtools_target_impl.h" |
| 23 #include "chrome/browser/extensions/api/debugger/debugger_api_constants.h" | 23 #include "chrome/browser/extensions/api/debugger/debugger_api_constants.h" |
| 24 #include "chrome/browser/extensions/extension_service.h" | 24 #include "chrome/browser/extensions/extension_service.h" |
| 25 #include "chrome/browser/extensions/extension_tab_util.h" | 25 #include "chrome/browser/extensions/extension_tab_util.h" |
| 26 #include "chrome/browser/infobars/confirm_infobar_delegate.h" | 26 #include "chrome/browser/infobars/confirm_infobar_delegate.h" |
| 27 #include "chrome/browser/infobars/infobar.h" | |
| 28 #include "chrome/browser/infobars/infobar_service.h" | 27 #include "chrome/browser/infobars/infobar_service.h" |
| 29 #include "chrome/browser/profiles/profile.h" | 28 #include "chrome/browser/profiles/profile.h" |
| 30 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 29 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
| 31 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
| 31 #include "components/infobars/core/infobar.h" |
| 32 #include "content/public/browser/devtools_agent_host.h" | 32 #include "content/public/browser/devtools_agent_host.h" |
| 33 #include "content/public/browser/devtools_client_host.h" | 33 #include "content/public/browser/devtools_client_host.h" |
| 34 #include "content/public/browser/devtools_http_handler.h" | 34 #include "content/public/browser/devtools_http_handler.h" |
| 35 #include "content/public/browser/devtools_manager.h" | 35 #include "content/public/browser/devtools_manager.h" |
| 36 #include "content/public/browser/notification_service.h" | 36 #include "content/public/browser/notification_service.h" |
| 37 #include "content/public/browser/notification_source.h" | 37 #include "content/public/browser/notification_source.h" |
| 38 #include "content/public/browser/render_process_host.h" | 38 #include "content/public/browser/render_process_host.h" |
| 39 #include "content/public/browser/render_view_host.h" | 39 #include "content/public/browser/render_view_host.h" |
| 40 #include "content/public/browser/render_widget_host.h" | 40 #include "content/public/browser/render_widget_host.h" |
| 41 #include "content/public/browser/web_contents.h" | 41 #include "content/public/browser/web_contents.h" |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 | 711 |
| 712 void DebuggerGetTargetsFunction::SendTargetList( | 712 void DebuggerGetTargetsFunction::SendTargetList( |
| 713 const std::vector<DevToolsTargetImpl*>& target_list) { | 713 const std::vector<DevToolsTargetImpl*>& target_list) { |
| 714 scoped_ptr<base::ListValue> result(new base::ListValue()); | 714 scoped_ptr<base::ListValue> result(new base::ListValue()); |
| 715 for (size_t i = 0; i < target_list.size(); ++i) | 715 for (size_t i = 0; i < target_list.size(); ++i) |
| 716 result->Append(SerializeTarget(*target_list[i])); | 716 result->Append(SerializeTarget(*target_list[i])); |
| 717 STLDeleteContainerPointers(target_list.begin(), target_list.end()); | 717 STLDeleteContainerPointers(target_list.begin(), target_list.end()); |
| 718 SetResult(result.release()); | 718 SetResult(result.release()); |
| 719 SendResponse(true); | 719 SendResponse(true); |
| 720 } | 720 } |
| OLD | NEW |