Index: content/shell/shell_devtools_delegate.cc |
diff --git a/content/shell/shell_devtools_delegate.cc b/content/shell/shell_devtools_delegate.cc |
index 88821efb847eb8a7e0b8dac5f99435d46432b3e9..9f89fe6b15a084305a7e8f57c355fafc1fcb417d 100644 |
--- a/content/shell/shell_devtools_delegate.cc |
+++ b/content/shell/shell_devtools_delegate.cc |
@@ -5,6 +5,8 @@ |
#include "content/shell/shell_devtools_delegate.h" |
#include "content/public/browser/devtools_http_handler.h" |
+#include "content/public/browser/web_contents.h" |
+#include "content/shell/shell.h" |
#include "grit/shell_resources.h" |
#include "net/base/tcp_listen_socket.h" |
#include "net/url_request/url_request_context_getter.h" |
@@ -13,7 +15,9 @@ |
namespace content { |
-ShellDevToolsDelegate::ShellDevToolsDelegate(int port) { |
+ShellDevToolsDelegate::ShellDevToolsDelegate(BrowserContext* browser_context, |
+ int port) |
+ : browser_context_(browser_context) { |
devtools_http_handler_ = DevToolsHttpHandler::Start( |
new net::TCPListenSocketFactory("127.0.0.1", port), |
"", |
@@ -46,4 +50,13 @@ std::string ShellDevToolsDelegate::GetPageThumbnailData(const GURL& url) { |
return ""; |
} |
+RenderViewHost* ShellDevToolsDelegate::CreateNewTarget() { |
+ Shell* shell = Shell::CreateNewWindow(browser_context_, |
+ GURL("about:blank"), |
jam
2012/10/05 16:19:17
nit: use kAboutBlankURL
|
+ NULL, |
+ MSG_ROUTING_NONE, |
+ NULL); |
+ return shell->web_contents()->GetRenderViewHost(); |
+} |
+ |
} // namespace content |