Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 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_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_H_ | |
| 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/memory/ref_counted.h" | |
| 12 #include "base/memory/scoped_ptr.h" | |
|
jam
2011/11/21 19:26:56
nit: not needed
yurys
2011/12/01 18:02:20
Done.
| |
| 13 #include "content/common/content_export.h" | |
| 14 | |
| 15 namespace content { | |
| 16 | |
| 17 class DevToolsHttpHandlerDelegate; | |
| 18 | |
| 19 class DevToolsHttpHandler | |
|
jam
2011/11/21 19:26:56
nit: please add a comment about what this class is
yurys
2011/12/01 18:02:20
Done.
| |
| 20 : public base::RefCountedThreadSafe<DevToolsHttpHandler> { | |
|
jam
2011/11/21 19:26:56
it seems that the refcounting is an internal imple
yurys
2011/12/01 18:02:20
Done. I made DevToolsHttpHandlerImpl refcounted bu
| |
| 21 public: | |
| 22 // Takes ownership over |delegate|. | |
| 23 CONTENT_EXPORT static scoped_refptr<DevToolsHttpHandler> Start( | |
|
jam
2011/11/21 19:26:56
nit: usually for functions that construct an objec
yurys
2011/12/01 18:02:20
Done. This class is not refcounted anymore. I thin
| |
| 24 const std::string& ip, | |
| 25 int port, | |
| 26 const std::string& frontend_url, | |
| 27 DevToolsHttpHandlerDelegate* delegate); | |
| 28 | |
| 29 // Called from the main thread in order to stop protocol handler. | |
| 30 // Will schedule tear down task on IO thread. | |
| 31 virtual CONTENT_EXPORT void Stop() = 0; | |
| 32 | |
| 33 protected: | |
| 34 DevToolsHttpHandler() {} | |
|
jam
2011/11/21 19:26:56
nit: not necessary
yurys
2011/12/01 18:02:20
Done.
| |
| 35 virtual ~DevToolsHttpHandler() {} | |
| 36 | |
| 37 private: | |
| 38 friend class base::RefCountedThreadSafe<DevToolsHttpHandler>; | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandler); | |
|
jam
2011/11/21 19:26:56
(and also in the other interface)
nit: no need fo
yurys
2011/12/01 18:02:20
Done.
| |
| 41 }; | |
| 42 | |
| 43 } // namespace content | |
| 44 | |
| 45 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_H_ | |
| OLD | NEW |