OLD | NEW |
---|---|
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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "content/public/browser/android/devtools_auth.h" | 9 #include "content/public/browser/android/devtools_auth.h" |
10 #include "content/public/browser/devtools_http_handler.h" | 10 #include "content/public/browser/devtools_http_handler.h" |
11 #include "grit/shell_resources.h" | 11 #include "grit/shell_resources.h" |
12 #include "net/base/unix_domain_socket_posix.h" | 12 #include "net/base/unix_domain_socket_posix.h" |
13 #include "ui/base/layout.h" | 13 #include "ui/base/layout.h" |
14 #include "ui/base/resource/resource_bundle.h" | 14 #include "ui/base/resource/resource_bundle.h" |
15 | 15 |
yurys
2012/10/05 14:29:49
Revert this line.
pfeldman
2012/10/05 14:36:47
Done.
| |
16 | |
16 namespace { | 17 namespace { |
17 | 18 |
18 // TODO(mnaganov): This hardcoded version should be replaced with the webkit | 19 // TODO(mnaganov): This hardcoded version should be replaced with the webkit |
19 // revision of this build of content shell. This requires a feature addition | 20 // revision of this build of content shell. This requires a feature addition |
20 // to the devtools frontend. | 21 // to the devtools frontend. |
21 const char* kFrontendVersion = "21.0.1175.0"; | 22 const char* kFrontendVersion = "21.0.1175.0"; |
22 const char kSocketName[] = "content_shell_devtools_remote"; | 23 const char kSocketName[] = "content_shell_devtools_remote"; |
23 const char kFrontEndURL[] = | 24 const char kFrontEndURL[] = |
24 "http://chrome-devtools-frontend.appspot.com/static/%s/devtools.html"; | 25 "http://chrome-devtools-frontend.appspot.com/static/%s/devtools.html"; |
25 | 26 |
26 } | 27 } |
27 | 28 |
28 namespace content { | 29 namespace content { |
29 | 30 |
30 ShellDevToolsDelegate::ShellDevToolsDelegate(int port) { | 31 ShellDevToolsDelegate::ShellDevToolsDelegate(BrowserContext* browser_context, |
32 int port) | |
33 : browser_context_(browser_context) { | |
31 devtools_http_handler_ = DevToolsHttpHandler::Start( | 34 devtools_http_handler_ = DevToolsHttpHandler::Start( |
32 new net::UnixDomainSocketWithAbstractNamespaceFactory( | 35 new net::UnixDomainSocketWithAbstractNamespaceFactory( |
33 kSocketName, | 36 kSocketName, |
34 base::Bind(&CanUserConnectToDevTools)), | 37 base::Bind(&CanUserConnectToDevTools)), |
35 StringPrintf(kFrontEndURL, kFrontendVersion), | 38 StringPrintf(kFrontEndURL, kFrontendVersion), |
36 this); | 39 this); |
37 } | 40 } |
38 | 41 |
39 ShellDevToolsDelegate::~ShellDevToolsDelegate() { | 42 ShellDevToolsDelegate::~ShellDevToolsDelegate() { |
40 } | 43 } |
(...skipping 14 matching lines...) Expand all Loading... | |
55 } | 58 } |
56 | 59 |
57 FilePath ShellDevToolsDelegate::GetDebugFrontendDir() { | 60 FilePath ShellDevToolsDelegate::GetDebugFrontendDir() { |
58 return FilePath(); | 61 return FilePath(); |
59 } | 62 } |
60 | 63 |
61 std::string ShellDevToolsDelegate::GetPageThumbnailData(const GURL& url) { | 64 std::string ShellDevToolsDelegate::GetPageThumbnailData(const GURL& url) { |
62 return ""; | 65 return ""; |
63 } | 66 } |
64 | 67 |
68 RenderViewHost* ShellDevToolsDelegate::CreateNewTarget() { | |
69 return NULL; | |
70 } | |
71 | |
65 } // namespace content | 72 } // namespace content |
OLD | NEW |