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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "android_webview/common/aw_content_client.h" | 9 #include "android_webview/common/aw_content_client.h" |
10 #include "android_webview/native/aw_contents.h" | 10 #include "android_webview/native/aw_contents.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/json/json_writer.h" | 13 #include "base/json/json_writer.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "components/devtools_http_handler/devtools_http_handler.h" | 17 #include "components/devtools_http_handler/devtools_http_handler.h" |
18 #include "components/devtools_http_handler/devtools_http_handler_delegate.h" | 18 #include "components/devtools_http_handler/devtools_http_handler_delegate.h" |
19 #include "content/public/browser/android/devtools_auth.h" | 19 #include "content/public/browser/android/devtools_auth.h" |
20 #include "content/public/browser/devtools_agent_host.h" | 20 #include "content/public/browser/devtools_agent_host.h" |
21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
22 #include "content/public/common/user_agent.h" | 22 #include "content/public/common/user_agent.h" |
23 #include "jni/AwDevToolsServer_jni.h" | 23 #include "jni/AwDevToolsServer_jni.h" |
24 #include "net/base/net_errors.h" | 24 #include "net/base/net_errors.h" |
25 #include "net/socket/unix_domain_server_socket_posix.h" | 25 #include "net/socket/unix_domain_server_socket_posix.h" |
26 | 26 |
| 27 using base::android::JavaParamRef; |
27 using content::DevToolsAgentHost; | 28 using content::DevToolsAgentHost; |
28 using content::RenderViewHost; | 29 using content::RenderViewHost; |
29 using content::WebContents; | 30 using content::WebContents; |
30 using devtools_http_handler::DevToolsHttpHandler; | 31 using devtools_http_handler::DevToolsHttpHandler; |
31 | 32 |
32 namespace { | 33 namespace { |
33 | 34 |
34 const char kFrontEndURL[] = | 35 const char kFrontEndURL[] = |
35 "http://chrome-devtools-frontend.appspot.com/serve_rev/%s/inspector.html"; | 36 "http://chrome-devtools-frontend.appspot.com/serve_rev/%s/inspector.html"; |
36 const char kSocketNameFormat[] = "webview_devtools_remote_%d"; | 37 const char kSocketNameFormat[] = "webview_devtools_remote_%d"; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 AwDevToolsServer* devtools_server = | 184 AwDevToolsServer* devtools_server = |
184 reinterpret_cast<AwDevToolsServer*>(server); | 185 reinterpret_cast<AwDevToolsServer*>(server); |
185 if (enabled) { | 186 if (enabled) { |
186 devtools_server->Start(); | 187 devtools_server->Start(); |
187 } else { | 188 } else { |
188 devtools_server->Stop(); | 189 devtools_server->Stop(); |
189 } | 190 } |
190 } | 191 } |
191 | 192 |
192 } // namespace android_webview | 193 } // namespace android_webview |
OLD | NEW |