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