OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_ANDROID_DEVTOOLS_SERVER_H_ | |
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_DEVTOOLS_SERVER_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/callback_forward.h" | |
11 | |
12 namespace net { | |
13 class URLRequestContextGetter; | |
14 } | |
15 | |
16 namespace content { | |
17 | |
18 class DevToolsHttpHandlerDelegate; | |
19 | |
20 // This class controls Chrome Developer Tools remote debugging server. | |
jam
2012/07/11 15:19:22
nit: remove the "Chrome"
Philippe
2012/07/11 15:48:05
Done.
| |
21 class DevToolsServer { | |
22 public: | |
23 // A callback being called each time the server restarts. | |
24 // The delegate instance is deleted on server stop, so the creator must | |
25 // provide the new instance on each call. | |
26 typedef base::Callback<content::DevToolsHttpHandlerDelegate*(void)> | |
27 DelegateCreator; | |
28 | |
29 // Returns the singleton instance (and initializes it if necessary). | |
30 static DevToolsServer* GetInstance(); | |
31 | |
32 // Initializes the server. Must be called prior to the first call of |Start|. | |
33 virtual void Init(const std::string& frontend_version, | |
34 net::URLRequestContextGetter* url_request_context, | |
35 const DelegateCreator& delegate_creator) = 0; | |
36 | |
37 // Opens linux abstract socket to be ready for remote debugging. | |
38 virtual void Start() = 0; | |
39 | |
40 // Closes debugging socket, stops debugging. | |
41 virtual void Stop() = 0; | |
42 | |
43 virtual bool is_initialized() const = 0; | |
jam
2012/07/11 15:19:22
for this and below, see the google style guide on
Philippe
2012/07/11 15:48:05
Done.
| |
44 | |
45 virtual bool is_started() const = 0; | |
46 | |
47 protected: | |
48 // Obtain an instance via GetInstance(). | |
49 DevToolsServer() {} | |
jam
2012/07/11 15:19:22
i don't think you need this
Philippe
2012/07/11 15:48:05
Right. The client can't instantiate this class any
| |
50 virtual ~DevToolsServer() {} | |
51 }; | |
52 | |
53 } // namespace content | |
54 | |
55 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DEVTOOLS_SERVER_H_ | |
OLD | NEW |