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