OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_PUBLIC_BROWSER_DEVTOOLS_HTTP_HANDLER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_HTTP_HANDLER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_HTTP_HANDLER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_HTTP_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
| 14 class StreamListenSocketFactory; |
14 class URLRequestContextGetter; | 15 class URLRequestContextGetter; |
15 } | 16 } |
16 | 17 |
17 namespace content { | 18 namespace content { |
18 | 19 |
19 class DevToolsHttpHandlerDelegate; | 20 class DevToolsHttpHandlerDelegate; |
20 class RenderViewHost; | 21 class RenderViewHost; |
21 | 22 |
22 // This class is used for managing DevTools remote debugging server. | 23 // This class is used for managing DevTools remote debugging server. |
23 // Clients can connect to the specified ip:port and start debugging | 24 // Clients can connect to the specified ip:port and start debugging |
(...skipping 10 matching lines...) Expand all Loading... |
34 virtual std::string GetIdentifier(RenderViewHost* rvh) = 0; | 35 virtual std::string GetIdentifier(RenderViewHost* rvh) = 0; |
35 | 36 |
36 // Returns the mapping of identifier to RenderViewHost. | 37 // Returns the mapping of identifier to RenderViewHost. |
37 virtual RenderViewHost* ForIdentifier(const std::string& identifier) = 0; | 38 virtual RenderViewHost* ForIdentifier(const std::string& identifier) = 0; |
38 }; | 39 }; |
39 | 40 |
40 // Returns frontend resource id for the given resource |name|. | 41 // Returns frontend resource id for the given resource |name|. |
41 CONTENT_EXPORT static int GetFrontendResourceId( | 42 CONTENT_EXPORT static int GetFrontendResourceId( |
42 const std::string& name); | 43 const std::string& name); |
43 | 44 |
44 // Takes ownership over |delegate|. | 45 // Takes ownership over |socket_factory| and |delegate|. |
45 CONTENT_EXPORT static DevToolsHttpHandler* Start( | 46 CONTENT_EXPORT static DevToolsHttpHandler* Start( |
46 const std::string& ip, | |
47 int port, | |
48 const std::string& frontend_url, | 47 const std::string& frontend_url, |
| 48 net::StreamListenSocketFactory* socket_factory, |
49 net::URLRequestContextGetter* request_context_getter, | 49 net::URLRequestContextGetter* request_context_getter, |
50 DevToolsHttpHandlerDelegate* delegate); | 50 DevToolsHttpHandlerDelegate* delegate); |
51 | 51 |
52 // Called from the main thread in order to stop protocol handler. | 52 // Called from the main thread in order to stop protocol handler. |
53 // Automatically destroys the handler instance. | 53 // Automatically destroys the handler instance. |
54 virtual void Stop() = 0; | 54 virtual void Stop() = 0; |
55 | 55 |
56 // Set the RenderViewHostBinding instance. If no instance is provided the | 56 // Set the RenderViewHostBinding instance. If no instance is provided the |
57 // default implementation will be used. | 57 // default implementation will be used. |
58 virtual void SetRenderViewHostBinding(RenderViewHostBinding* binding) = 0; | 58 virtual void SetRenderViewHostBinding(RenderViewHostBinding* binding) = 0; |
59 | 59 |
60 protected: | 60 protected: |
61 virtual ~DevToolsHttpHandler() {} | 61 virtual ~DevToolsHttpHandler() {} |
62 }; | 62 }; |
63 | 63 |
64 } // namespace content | 64 } // namespace content |
65 | 65 |
66 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_HTTP_HANDLER_H_ | 66 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_HTTP_HANDLER_H_ |
OLD | NEW |