OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_ANDROID_DEV_TOOLS_SERVER_H_ | |
6 #define CHROME_BROWSER_ANDROID_DEV_TOOLS_SERVER_H_ | |
7 | |
8 #include <jni.h> | |
9 | |
10 #include <memory> | |
11 #include <string> | |
12 | |
13 #include "base/macros.h" | |
14 | |
15 namespace devtools_http_handler { | |
16 class DevToolsHttpHandler; | |
17 } | |
18 | |
19 // This class controls Developer Tools remote debugging server. | |
20 class DevToolsServer { | |
21 public: | |
22 explicit DevToolsServer(const std::string& socket_name_prefix); | |
23 ~DevToolsServer(); | |
24 | |
25 // Opens linux abstract socket to be ready for remote debugging. | |
26 void Start(bool allow_debug_permission); | |
27 | |
28 // Closes debugging socket, stops debugging. | |
29 void Stop(); | |
30 | |
31 bool IsStarted() const; | |
32 | |
33 private: | |
34 std::string socket_name_; | |
35 std::unique_ptr<devtools_http_handler::DevToolsHttpHandler> | |
36 devtools_http_handler_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(DevToolsServer); | |
39 }; | |
40 | |
41 bool RegisterDevToolsServer(JNIEnv* env); | |
42 | |
43 #endif // CHROME_BROWSER_ANDROID_DEV_TOOLS_SERVER_H_ | |
OLD | NEW |