| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/devtools/devtools_target_impl.h" | |
| 6 | |
| 7 #include "base/strings/stringprintf.h" | |
| 8 #include "base/strings/utf_string_conversions.h" | |
| 9 #include "chrome/browser/devtools/devtools_window.h" | |
| 10 #include "chrome/browser/extensions/extension_tab_util.h" | |
| 11 #include "chrome/browser/profiles/profile.h" | |
| 12 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" | |
| 13 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" | |
| 14 #include "chrome/common/extensions/extension_constants.h" | |
| 15 #include "components/guest_view/browser/guest_view_base.h" | |
| 16 #include "content/public/browser/browser_thread.h" | |
| 17 #include "content/public/browser/devtools_agent_host.h" | |
| 18 #include "content/public/browser/favicon_status.h" | |
| 19 #include "content/public/browser/navigation_entry.h" | |
| 20 #include "content/public/browser/render_frame_host.h" | |
| 21 #include "content/public/browser/web_contents.h" | |
| 22 #include "extensions/browser/extension_host.h" | |
| 23 #include "extensions/browser/extension_registry.h" | |
| 24 #include "extensions/browser/process_manager.h" | |
| 25 #include "extensions/common/constants.h" | |
| 26 | |
| 27 using content::BrowserThread; | |
| 28 using content::DevToolsAgentHost; | |
| 29 using content::WebContents; | |
| 30 | |
| 31 DevToolsTargetImpl::~DevToolsTargetImpl() { | |
| 32 } | |
| 33 | |
| 34 DevToolsTargetImpl::DevToolsTargetImpl( | |
| 35 scoped_refptr<DevToolsAgentHost> agent_host) | |
| 36 : devtools_discovery::BasicTargetDescriptor(agent_host) { | |
| 37 } | |
| 38 | |
| 39 // static | |
| 40 std::vector<DevToolsTargetImpl*> DevToolsTargetImpl::EnumerateAll() { | |
| 41 DCHECK_CURRENTLY_ON(BrowserThread::UI); | |
| 42 | |
| 43 std::vector<DevToolsTargetImpl*> result; | |
| 44 DevToolsAgentHost::List agents = DevToolsAgentHost::GetOrCreateAll(); | |
| 45 for (DevToolsAgentHost::List::iterator it = agents.begin(); | |
| 46 it != agents.end(); ++it) { | |
| 47 result.push_back(new DevToolsTargetImpl(*it)); | |
| 48 } | |
| 49 return result; | |
| 50 } | |
| OLD | NEW |