| 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 #ifndef CHROME_BROWSER_ANDROID_DEV_TOOLS_SERVER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_DEV_TOOLS_SERVER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_DEV_TOOLS_SERVER_H_ | 6 #define CHROME_BROWSER_ANDROID_DEV_TOOLS_SERVER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <jni.h> | 9 #include <jni.h> |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 class DevToolsHttpHandler; | 13 class DevToolsHttpHandler; |
| 14 } | 14 } |
| 15 | 15 |
| 16 // This class controls Developer Tools remote debugging server. | 16 // This class controls Developer Tools remote debugging server. |
| 17 class DevToolsServer { | 17 class DevToolsServer { |
| 18 public: | 18 public: |
| 19 // TODO(mnaganov): Remove the prefixless constructor after having its | |
| 20 // usage removed in the Chrome for Android code. | |
| 21 DevToolsServer(); | |
| 22 explicit DevToolsServer(const std::string& socket_name_prefix); | 19 explicit DevToolsServer(const std::string& socket_name_prefix); |
| 23 ~DevToolsServer(); | 20 ~DevToolsServer(); |
| 24 | 21 |
| 25 // Opens linux abstract socket to be ready for remote debugging. | 22 // Opens linux abstract socket to be ready for remote debugging. |
| 26 void Start(); | 23 void Start(bool allow_debug_permission); |
| 27 | 24 |
| 28 // Closes debugging socket, stops debugging. | 25 // Closes debugging socket, stops debugging. |
| 29 void Stop(); | 26 void Stop(); |
| 30 | 27 |
| 31 bool IsStarted() const; | 28 bool IsStarted() const; |
| 32 | 29 |
| 33 private: | 30 private: |
| 34 std::string socket_name_; | 31 std::string socket_name_; |
| 35 content::DevToolsHttpHandler* protocol_handler_; | 32 content::DevToolsHttpHandler* protocol_handler_; |
| 36 | 33 |
| 37 DISALLOW_COPY_AND_ASSIGN(DevToolsServer); | 34 DISALLOW_COPY_AND_ASSIGN(DevToolsServer); |
| 38 }; | 35 }; |
| 39 | 36 |
| 40 bool RegisterDevToolsServer(JNIEnv* env); | 37 bool RegisterDevToolsServer(JNIEnv* env); |
| 41 | 38 |
| 42 #endif // CHROME_BROWSER_ANDROID_DEV_TOOLS_SERVER_H_ | 39 #endif // CHROME_BROWSER_ANDROID_DEV_TOOLS_SERVER_H_ |
| OLD | NEW |