| 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 #ifndef ANDROID_WEBVIEW_NATIVE_AW_DEV_TOOLS_SERVER_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_DEV_TOOLS_SERVER_H_ |
| 6 #define ANDROID_WEBVIEW_NATIVE_AW_DEV_TOOLS_SERVER_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_AW_DEV_TOOLS_SERVER_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 | 14 |
| 15 namespace devtools_http_handler { | |
| 16 class DevToolsHttpHandler; | |
| 17 } | |
| 18 | |
| 19 namespace android_webview { | 15 namespace android_webview { |
| 20 | 16 |
| 21 // This class controls WebView-specific Developer Tools remote debugging server. | 17 // This class controls WebView-specific Developer Tools remote debugging server. |
| 22 class AwDevToolsServer { | 18 class AwDevToolsServer { |
| 23 public: | 19 public: |
| 24 AwDevToolsServer(); | 20 AwDevToolsServer(); |
| 25 ~AwDevToolsServer(); | 21 ~AwDevToolsServer(); |
| 26 | 22 |
| 27 // Opens linux abstract socket to be ready for remote debugging. | 23 // Opens linux abstract socket to be ready for remote debugging. |
| 28 void Start(); | 24 void Start(); |
| 29 | 25 |
| 30 // Closes debugging socket, stops debugging. | 26 // Closes debugging socket, stops debugging. |
| 31 void Stop(); | 27 void Stop(); |
| 32 | 28 |
| 33 bool IsStarted() const; | 29 bool IsStarted() const; |
| 34 | 30 |
| 35 private: | 31 private: |
| 36 std::unique_ptr<devtools_http_handler::DevToolsHttpHandler> | 32 bool is_started_; |
| 37 devtools_http_handler_; | |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(AwDevToolsServer); | 33 DISALLOW_COPY_AND_ASSIGN(AwDevToolsServer); |
| 40 }; | 34 }; |
| 41 | 35 |
| 42 bool RegisterAwDevToolsServer(JNIEnv* env); | 36 bool RegisterAwDevToolsServer(JNIEnv* env); |
| 43 | 37 |
| 44 } // namespace android_webview | 38 } // namespace android_webview |
| 45 | 39 |
| 46 #endif // ANDROID_WEBVIEW_NATIVE_AW_DEV_TOOLS_SERVER_H_ | 40 #endif // ANDROID_WEBVIEW_NATIVE_AW_DEV_TOOLS_SERVER_H_ |
| OLD | NEW |