Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(707)

Unified Diff: content/shell/shell_devtools_delegate.cc

Issue 11033046: DevTools: [remote debugging] introduce json/new and json/close for creating and closing the tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Used constants for about:blank Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/shell_devtools_delegate.h ('k') | content/shell/shell_devtools_delegate_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..24a51be351daed8be1596fc43d3c7889003debfa 100644
--- a/content/shell/shell_devtools_delegate.cc
+++ b/content/shell/shell_devtools_delegate.cc
@@ -5,6 +5,9 @@
#include "content/shell/shell_devtools_delegate.h"
#include "content/public/browser/devtools_http_handler.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/common/url_constants.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 +16,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 +51,13 @@ std::string ShellDevToolsDelegate::GetPageThumbnailData(const GURL& url) {
return "";
}
+RenderViewHost* ShellDevToolsDelegate::CreateNewTarget() {
+ Shell* shell = Shell::CreateNewWindow(browser_context_,
+ GURL(chrome::kAboutBlankURL),
+ NULL,
+ MSG_ROUTING_NONE,
+ NULL);
+ return shell->web_contents()->GetRenderViewHost();
+}
+
} // namespace content
« no previous file with comments | « content/shell/shell_devtools_delegate.h ('k') | content/shell/shell_devtools_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698