| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/shell_devtools_manager_delegate.h" | 5 #include "content/shell/browser/shell_devtools_manager_delegate.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "content/public/common/content_switches.h" | 29 #include "content/public/common/content_switches.h" |
| 30 #include "content/public/common/url_constants.h" | 30 #include "content/public/common/url_constants.h" |
| 31 #include "content/public/common/user_agent.h" | 31 #include "content/public/common/user_agent.h" |
| 32 #include "content/shell/browser/shell.h" | 32 #include "content/shell/browser/shell.h" |
| 33 #include "content/shell/common/shell_content_client.h" | 33 #include "content/shell/common/shell_content_client.h" |
| 34 #include "grit/shell_resources.h" | 34 #include "grit/shell_resources.h" |
| 35 #include "net/base/net_errors.h" | 35 #include "net/base/net_errors.h" |
| 36 #include "net/log/net_log_source.h" | 36 #include "net/log/net_log_source.h" |
| 37 #include "net/socket/tcp_server_socket.h" | 37 #include "net/socket/tcp_server_socket.h" |
| 38 #include "ui/base/resource/resource_bundle.h" | 38 #include "ui/base/resource/resource_bundle.h" |
| 39 #include "v8/include/v8.h" |
| 39 | 40 |
| 40 #if defined(OS_ANDROID) | 41 #if defined(OS_ANDROID) |
| 41 #include "content/public/browser/android/devtools_auth.h" | 42 #include "content/public/browser/android/devtools_auth.h" |
| 42 #include "net/socket/unix_domain_server_socket_posix.h" | 43 #include "net/socket/unix_domain_server_socket_posix.h" |
| 43 #endif | 44 #endif |
| 44 | 45 |
| 45 namespace content { | 46 namespace content { |
| 46 | 47 |
| 47 namespace { | 48 namespace { |
| 48 | 49 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 std::string frontend_url; | 162 std::string frontend_url; |
| 162 #if defined(OS_ANDROID) | 163 #if defined(OS_ANDROID) |
| 163 frontend_url = base::StringPrintf(kFrontEndURL, GetWebKitRevision().c_str()); | 164 frontend_url = base::StringPrintf(kFrontEndURL, GetWebKitRevision().c_str()); |
| 164 #endif | 165 #endif |
| 165 DevToolsAgentHost::StartRemoteDebuggingServer( | 166 DevToolsAgentHost::StartRemoteDebuggingServer( |
| 166 CreateSocketFactory(), | 167 CreateSocketFactory(), |
| 167 frontend_url, | 168 frontend_url, |
| 168 browser_context->GetPath(), | 169 browser_context->GetPath(), |
| 169 base::FilePath(), | 170 base::FilePath(), |
| 170 std::string(), | 171 std::string(), |
| 171 GetShellUserAgent()); | 172 GetShellUserAgent(), |
| 173 v8::V8::GetVersion()); |
| 172 } | 174 } |
| 173 | 175 |
| 174 // static | 176 // static |
| 175 void ShellDevToolsManagerDelegate::StopHttpHandler() { | 177 void ShellDevToolsManagerDelegate::StopHttpHandler() { |
| 176 DevToolsAgentHost::StopRemoteDebuggingServer(); | 178 DevToolsAgentHost::StopRemoteDebuggingServer(); |
| 177 } | 179 } |
| 178 | 180 |
| 179 ShellDevToolsManagerDelegate::ShellDevToolsManagerDelegate( | 181 ShellDevToolsManagerDelegate::ShellDevToolsManagerDelegate( |
| 180 BrowserContext* browser_context) | 182 BrowserContext* browser_context) |
| 181 : browser_context_(browser_context) { | 183 : browser_context_(browser_context) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 201 IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE).as_string(); | 203 IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE).as_string(); |
| 202 #endif | 204 #endif |
| 203 } | 205 } |
| 204 | 206 |
| 205 std::string ShellDevToolsManagerDelegate::GetFrontendResource( | 207 std::string ShellDevToolsManagerDelegate::GetFrontendResource( |
| 206 const std::string& path) { | 208 const std::string& path) { |
| 207 return content::DevToolsFrontendHost::GetFrontendResource(path).as_string(); | 209 return content::DevToolsFrontendHost::GetFrontendResource(path).as_string(); |
| 208 } | 210 } |
| 209 | 211 |
| 210 } // namespace content | 212 } // namespace content |
| OLD | NEW |