| 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 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 class DevToolsHttpHandler; | 15 class DevToolsHttpHandler; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace android_webview { | 18 namespace android_webview { |
| 18 | 19 |
| 19 // This class controls WebView-specific Developer Tools remote debugging server. | 20 // This class controls WebView-specific Developer Tools remote debugging server. |
| 20 class AwDevToolsServer { | 21 class AwDevToolsServer { |
| 21 public: | 22 public: |
| 22 AwDevToolsServer(); | 23 AwDevToolsServer(); |
| 23 ~AwDevToolsServer(); | 24 ~AwDevToolsServer(); |
| 24 | 25 |
| 25 // Opens linux abstract socket to be ready for remote debugging. | 26 // Opens linux abstract socket to be ready for remote debugging. |
| 26 void Start(); | 27 void Start(); |
| 27 | 28 |
| 28 // Closes debugging socket, stops debugging. | 29 // Closes debugging socket, stops debugging. |
| 29 void Stop(); | 30 void Stop(); |
| 30 | 31 |
| 31 bool IsStarted() const; | 32 bool IsStarted() const; |
| 32 | 33 |
| 33 private: | 34 private: |
| 34 content::DevToolsHttpHandler* protocol_handler_; | 35 scoped_ptr<content::DevToolsHttpHandler> protocol_handler_; |
| 35 | 36 |
| 36 DISALLOW_COPY_AND_ASSIGN(AwDevToolsServer); | 37 DISALLOW_COPY_AND_ASSIGN(AwDevToolsServer); |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 bool RegisterAwDevToolsServer(JNIEnv* env); | 40 bool RegisterAwDevToolsServer(JNIEnv* env); |
| 40 | 41 |
| 41 } // namespace android_webview | 42 } // namespace android_webview |
| 42 | 43 |
| 43 #endif // ANDROID_WEBVIEW_NATIVE_AW_DEV_TOOLS_SERVER_H_ | 44 #endif // ANDROID_WEBVIEW_NATIVE_AW_DEV_TOOLS_SERVER_H_ |
| OLD | NEW |