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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "content/shell/shell_devtools_delegate.h" 5 #include "content/shell/shell_devtools_delegate.h"
6 6
7 #include "content/public/browser/devtools_http_handler.h" 7 #include "content/public/browser/devtools_http_handler.h"
8 #include "content/public/browser/web_contents.h"
9 #include "content/public/common/url_constants.h"
10 #include "content/shell/shell.h"
8 #include "grit/shell_resources.h" 11 #include "grit/shell_resources.h"
9 #include "net/base/tcp_listen_socket.h" 12 #include "net/base/tcp_listen_socket.h"
10 #include "net/url_request/url_request_context_getter.h" 13 #include "net/url_request/url_request_context_getter.h"
11 #include "ui/base/layout.h" 14 #include "ui/base/layout.h"
12 #include "ui/base/resource/resource_bundle.h" 15 #include "ui/base/resource/resource_bundle.h"
13 16
14 namespace content { 17 namespace content {
15 18
16 ShellDevToolsDelegate::ShellDevToolsDelegate(int port) { 19 ShellDevToolsDelegate::ShellDevToolsDelegate(BrowserContext* browser_context,
20 int port)
21 : browser_context_(browser_context) {
17 devtools_http_handler_ = DevToolsHttpHandler::Start( 22 devtools_http_handler_ = DevToolsHttpHandler::Start(
18 new net::TCPListenSocketFactory("127.0.0.1", port), 23 new net::TCPListenSocketFactory("127.0.0.1", port),
19 "", 24 "",
20 this); 25 this);
21 } 26 }
22 27
23 ShellDevToolsDelegate::~ShellDevToolsDelegate() { 28 ShellDevToolsDelegate::~ShellDevToolsDelegate() {
24 } 29 }
25 30
26 void ShellDevToolsDelegate::Stop() { 31 void ShellDevToolsDelegate::Stop() {
(...skipping 12 matching lines...) Expand all
39 } 44 }
40 45
41 FilePath ShellDevToolsDelegate::GetDebugFrontendDir() { 46 FilePath ShellDevToolsDelegate::GetDebugFrontendDir() {
42 return FilePath(); 47 return FilePath();
43 } 48 }
44 49
45 std::string ShellDevToolsDelegate::GetPageThumbnailData(const GURL& url) { 50 std::string ShellDevToolsDelegate::GetPageThumbnailData(const GURL& url) {
46 return ""; 51 return "";
47 } 52 }
48 53
54 RenderViewHost* ShellDevToolsDelegate::CreateNewTarget() {
55 Shell* shell = Shell::CreateNewWindow(browser_context_,
56 GURL(chrome::kAboutBlankURL),
57 NULL,
58 MSG_ROUTING_NONE,
59 NULL);
60 return shell->web_contents()->GetRenderViewHost();
61 }
62
49 } // namespace content 63 } // namespace content
OLDNEW
« 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