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 "chrome/browser/android/dev_tools_server.h" | 5 #include "chrome/browser/android/dev_tools_server.h" |
6 | 6 |
| 7 #include <pwd.h> |
7 #include <cstring> | 8 #include <cstring> |
8 #include <pwd.h> | |
9 | 9 |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/stringprintf.h" | 16 #include "base/stringprintf.h" |
17 #include "chrome/browser/history/top_sites.h" | 17 #include "chrome/browser/history/top_sites.h" |
18 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
19 #include "chrome/common/chrome_version_info.h" | 19 #include "chrome/common/chrome_version_info.h" |
20 #include "content/public/browser/android/devtools_auth.h" | 20 #include "content/public/browser/android/devtools_auth.h" |
21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
22 #include "content/public/browser/devtools_http_handler.h" | 22 #include "content/public/browser/devtools_http_handler.h" |
23 #include "content/public/browser/devtools_http_handler_delegate.h" | 23 #include "content/public/browser/devtools_http_handler_delegate.h" |
| 24 #include "grit/devtools_discovery_page_resources.h" |
24 #include "jni/DevToolsServer_jni.h" | 25 #include "jni/DevToolsServer_jni.h" |
25 #include "grit/devtools_discovery_page_resources.h" | 26 #include "net/socket/unix_domain_socket_posix.h" |
26 #include "net/base/unix_domain_socket_posix.h" | |
27 #include "net/url_request/url_request_context_getter.h" | 27 #include "net/url_request/url_request_context_getter.h" |
28 #include "ui/base/resource/resource_bundle.h" | 28 #include "ui/base/resource/resource_bundle.h" |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 const char kFrontEndURL[] = | 32 const char kFrontEndURL[] = |
33 "http://chrome-devtools-frontend.appspot.com/static/%s/devtools.html"; | 33 "http://chrome-devtools-frontend.appspot.com/static/%s/devtools.html"; |
34 const char kSocketName[] = "chrome_devtools_remote"; | 34 const char kSocketName[] = "chrome_devtools_remote"; |
35 | 35 |
36 // Delegate implementation for the devtools http handler on android. A new | 36 // Delegate implementation for the devtools http handler on android. A new |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 jobject obj, | 175 jobject obj, |
176 jint server, | 176 jint server, |
177 jboolean enabled) { | 177 jboolean enabled) { |
178 DevToolsServer* devtools_server = reinterpret_cast<DevToolsServer*>(server); | 178 DevToolsServer* devtools_server = reinterpret_cast<DevToolsServer*>(server); |
179 if (enabled) { | 179 if (enabled) { |
180 devtools_server->Start(); | 180 devtools_server->Start(); |
181 } else { | 181 } else { |
182 devtools_server->Stop(); | 182 devtools_server->Stop(); |
183 } | 183 } |
184 } | 184 } |
OLD | NEW |