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