[email protected] | 689266d | 2012-08-07 12:52:20 | [diff] [blame] | 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 | |||||
pfeldman | 1062876 | 2016-09-08 07:59:26 | [diff] [blame] | 5 | #ifndef CHROME_BROWSER_ANDROID_DEVTOOLS_SERVER_H_ |
6 | #define CHROME_BROWSER_ANDROID_DEVTOOLS_SERVER_H_ | ||||
[email protected] | 689266d | 2012-08-07 12:52:20 | [diff] [blame] | 7 | |
dcheng | aeceb05e | 2016-04-07 23:41:10 | [diff] [blame] | 8 | #include <memory> |
avi | e4d7b6f | 2015-12-26 00:59:18 | [diff] [blame] | 9 | #include <string> |
dcheng | aeceb05e | 2016-04-07 23:41:10 | [diff] [blame] | 10 | |
avi | e4d7b6f | 2015-12-26 00:59:18 | [diff] [blame] | 11 | #include "base/macros.h" |
[email protected] | 689266d | 2012-08-07 12:52:20 | [diff] [blame] | 12 | |
[email protected] | 689266d | 2012-08-07 12:52:20 | [diff] [blame] | 13 | // This class controls Developer Tools remote debugging server. |
14 | class DevToolsServer { | ||||
15 | public: | ||||
[email protected] | 616d494 | 2013-06-27 14:28:35 | [diff] [blame] | 16 | explicit DevToolsServer(const std::string& socket_name_prefix); |
[email protected] | 689266d | 2012-08-07 12:52:20 | [diff] [blame] | 17 | ~DevToolsServer(); |
18 | |||||
19 | // Opens linux abstract socket to be ready for remote debugging. | ||||
[email protected] | fe928be9 | 2014-08-08 09:17:41 | [diff] [blame] | 20 | void Start(bool allow_debug_permission); |
[email protected] | 689266d | 2012-08-07 12:52:20 | [diff] [blame] | 21 | |
22 | // Closes debugging socket, stops debugging. | ||||
23 | void Stop(); | ||||
24 | |||||
25 | bool IsStarted() const; | ||||
26 | |||||
27 | private: | ||||
[email protected] | 90e6c541 | 2013-04-16 22:45:25 | [diff] [blame] | 28 | std::string socket_name_; |
pfeldman | 1062876 | 2016-09-08 07:59:26 | [diff] [blame] | 29 | bool is_started_; |
[email protected] | 689266d | 2012-08-07 12:52:20 | [diff] [blame] | 30 | |
31 | DISALLOW_COPY_AND_ASSIGN(DevToolsServer); | ||||
32 | }; | ||||
33 | |||||
pfeldman | 1062876 | 2016-09-08 07:59:26 | [diff] [blame] | 34 | #endif // CHROME_BROWSER_ANDROID_DEVTOOLS_SERVER_H_ |