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