Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: content/public/browser/devtools_http_handler.h

Issue 296053012: Replace StreamListenSocket with StreamSocket in HttpServer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h"
10 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
11 12
12 class GURL; 13 class GURL;
13 14
14 namespace net { 15 namespace net {
15 class StreamListenSocketFactory; 16 class ServerSocket;
16 class URLRequestContextGetter; 17 class URLRequestContextGetter;
17 } 18 }
18 19
19 namespace content { 20 namespace content {
20 21
21 class DevToolsHttpHandlerDelegate; 22 class DevToolsHttpHandlerDelegate;
22 23
23 // This class is used for managing DevTools remote debugging server. 24 // This class is used for managing DevTools remote debugging server.
24 // Clients can connect to the specified ip:port and start debugging 25 // Clients can connect to the specified ip:port and start debugging
25 // this browser. 26 // this browser.
26 class DevToolsHttpHandler { 27 class DevToolsHttpHandler {
27 public: 28 public:
28 // Returns true if the given protocol version is supported. 29 // Returns true if the given protocol version is supported.
29 CONTENT_EXPORT static bool IsSupportedProtocolVersion( 30 CONTENT_EXPORT static bool IsSupportedProtocolVersion(
30 const std::string& version); 31 const std::string& version);
31 32
32 // Returns frontend resource id for the given resource |name|. 33 // Returns frontend resource id for the given resource |name|.
33 CONTENT_EXPORT static int GetFrontendResourceId( 34 CONTENT_EXPORT static int GetFrontendResourceId(
34 const std::string& name); 35 const std::string& name);
35 36
36 // Takes ownership over |socket_factory| and |delegate|. 37 // Takes ownership over |socket_factory| and |delegate|.
37 CONTENT_EXPORT static DevToolsHttpHandler* Start( 38 CONTENT_EXPORT static DevToolsHttpHandler* Start(
38 const net::StreamListenSocketFactory* socket_factory, 39 scoped_ptr<net::ServerSocket> server_socket,
39 const std::string& frontend_url, 40 const std::string& frontend_url,
40 DevToolsHttpHandlerDelegate* delegate); 41 DevToolsHttpHandlerDelegate* delegate);
41 42
42 // Called from the main thread in order to stop protocol handler. 43 // Called from the main thread in order to stop protocol handler.
43 // Automatically destroys the handler instance. 44 // Automatically destroys the handler instance.
44 virtual void Stop() = 0; 45 virtual void Stop() = 0;
45 46
46 // Returns the URL for the address to debug |agent_host|. 47 // Returns the URL for the address to debug |agent_host|.
47 virtual GURL GetFrontendURL() = 0; 48 virtual GURL GetFrontendURL() = 0;
48 49
49 protected: 50 protected:
50 virtual ~DevToolsHttpHandler() {} 51 virtual ~DevToolsHttpHandler() {}
51 }; 52 };
52 53
53 } // namespace content 54 } // namespace content
54 55
55 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_HTTP_HANDLER_H_ 56 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_HTTP_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698