| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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/shell/browser/shell_devtools_delegate.h" | 5 #include "content/shell/browser/shell_devtools_delegate.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 } | 159 } |
| 160 | 160 |
| 161 base::FilePath ShellDevToolsDelegate::GetDebugFrontendDir() { | 161 base::FilePath ShellDevToolsDelegate::GetDebugFrontendDir() { |
| 162 return base::FilePath(); | 162 return base::FilePath(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 std::string ShellDevToolsDelegate::GetPageThumbnailData(const GURL& url) { | 165 std::string ShellDevToolsDelegate::GetPageThumbnailData(const GURL& url) { |
| 166 return std::string(); | 166 return std::string(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 scoped_ptr<DevToolsTarget> | 169 scoped_ptr<DevToolsTarget> ShellDevToolsDelegate::CreateNewTarget() { |
| 170 ShellDevToolsDelegate::CreateNewTarget(const GURL& url) { | |
| 171 Shell* shell = Shell::CreateNewWindow(browser_context_, | 170 Shell* shell = Shell::CreateNewWindow(browser_context_, |
| 172 url, | 171 GURL(kAboutBlankURL), |
| 173 NULL, | 172 NULL, |
| 174 MSG_ROUTING_NONE, | 173 MSG_ROUTING_NONE, |
| 175 gfx::Size()); | 174 gfx::Size()); |
| 176 return scoped_ptr<DevToolsTarget>(new Target(shell->web_contents())); | 175 return scoped_ptr<DevToolsTarget>(new Target(shell->web_contents())); |
| 177 } | 176 } |
| 178 | 177 |
| 179 void ShellDevToolsDelegate::EnumerateTargets(TargetCallback callback) { | 178 void ShellDevToolsDelegate::EnumerateTargets(TargetCallback callback) { |
| 180 TargetList targets; | 179 TargetList targets; |
| 181 std::vector<RenderViewHost*> rvh_list = | 180 std::vector<RenderViewHost*> rvh_list = |
| 182 content::DevToolsAgentHost::GetValidRenderViewHosts(); | 181 content::DevToolsAgentHost::GetValidRenderViewHosts(); |
| 183 for (std::vector<RenderViewHost*>::iterator it = rvh_list.begin(); | 182 for (std::vector<RenderViewHost*>::iterator it = rvh_list.begin(); |
| 184 it != rvh_list.end(); ++it) { | 183 it != rvh_list.end(); ++it) { |
| 185 WebContents* web_contents = WebContents::FromRenderViewHost(*it); | 184 WebContents* web_contents = WebContents::FromRenderViewHost(*it); |
| 186 if (web_contents) | 185 if (web_contents) |
| 187 targets.push_back(new Target(web_contents)); | 186 targets.push_back(new Target(web_contents)); |
| 188 } | 187 } |
| 189 callback.Run(targets); | 188 callback.Run(targets); |
| 190 } | 189 } |
| 191 | 190 |
| 192 scoped_ptr<net::StreamListenSocket> | 191 scoped_ptr<net::StreamListenSocket> |
| 193 ShellDevToolsDelegate::CreateSocketForTethering( | 192 ShellDevToolsDelegate::CreateSocketForTethering( |
| 194 net::StreamListenSocket::Delegate* delegate, | 193 net::StreamListenSocket::Delegate* delegate, |
| 195 std::string* name) { | 194 std::string* name) { |
| 196 return scoped_ptr<net::StreamListenSocket>(); | 195 return scoped_ptr<net::StreamListenSocket>(); |
| 197 } | 196 } |
| 198 | 197 |
| 199 } // namespace content | 198 } // namespace content |
| OLD | NEW |