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 "android_webview/native/aw_dev_tools_server.h" | 5 #include "android_webview/native/aw_dev_tools_server.h" |
6 | 6 |
7 #include "android_webview/native/aw_contents.h" | 7 #include "android_webview/native/aw_contents.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "net/base/net_errors.h" | 22 #include "net/base/net_errors.h" |
23 #include "net/socket/unix_domain_server_socket_posix.h" | 23 #include "net/socket/unix_domain_server_socket_posix.h" |
24 | 24 |
25 using content::DevToolsAgentHost; | 25 using content::DevToolsAgentHost; |
26 using content::RenderViewHost; | 26 using content::RenderViewHost; |
27 using content::WebContents; | 27 using content::WebContents; |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 const char kFrontEndURL[] = | 31 const char kFrontEndURL[] = |
32 "http://chrome-devtools-frontend.appspot.com/serve_rev/%s/devtools.html"; | 32 "http://chrome-devtools-frontend.appspot.com/serve_rev/%s/inspector.html"; |
33 const char kSocketNameFormat[] = "webview_devtools_remote_%d"; | 33 const char kSocketNameFormat[] = "webview_devtools_remote_%d"; |
34 const char kTetheringSocketName[] = "webview_devtools_tethering_%d_%d"; | 34 const char kTetheringSocketName[] = "webview_devtools_tethering_%d_%d"; |
35 | 35 |
36 const int kBackLog = 10; | 36 const int kBackLog = 10; |
37 | 37 |
38 // Delegate implementation for the devtools http handler for WebView. A new | 38 // Delegate implementation for the devtools http handler for WebView. A new |
39 // instance of this gets created each time web debugging is enabled. | 39 // instance of this gets created each time web debugging is enabled. |
40 class AwDevToolsServerDelegate : public content::DevToolsHttpHandlerDelegate { | 40 class AwDevToolsServerDelegate : public content::DevToolsHttpHandlerDelegate { |
41 public: | 41 public: |
42 AwDevToolsServerDelegate() : last_tethering_socket_(0) { | 42 AwDevToolsServerDelegate() : last_tethering_socket_(0) { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 AwDevToolsServer* devtools_server = | 158 AwDevToolsServer* devtools_server = |
159 reinterpret_cast<AwDevToolsServer*>(server); | 159 reinterpret_cast<AwDevToolsServer*>(server); |
160 if (enabled) { | 160 if (enabled) { |
161 devtools_server->Start(); | 161 devtools_server->Start(); |
162 } else { | 162 } else { |
163 devtools_server->Stop(); | 163 devtools_server->Stop(); |
164 } | 164 } |
165 } | 165 } |
166 | 166 |
167 } // namespace android_webview | 167 } // namespace android_webview |
OLD | NEW |