Chromium Code Reviews| Index: content/public/browser/devtools/devtools_http_handler.h |
| diff --git a/content/public/browser/devtools/devtools_http_handler.h b/content/public/browser/devtools/devtools_http_handler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2a35802d4637b2240c17bad2f92d734e71870da6 |
| --- /dev/null |
| +++ b/content/public/browser/devtools/devtools_http_handler.h |
| @@ -0,0 +1,45 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_H_ |
| +#define CONTENT_PUBLIC_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_H_ |
| +#pragma once |
| + |
| +#include <string> |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "base/memory/scoped_ptr.h" |
|
jam
2011/11/21 19:26:56
nit: not needed
yurys
2011/12/01 18:02:20
Done.
|
| +#include "content/common/content_export.h" |
| + |
| +namespace content { |
| + |
| +class DevToolsHttpHandlerDelegate; |
| + |
| +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.
|
| + : 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
|
| + public: |
| + // Takes ownership over |delegate|. |
| + 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
|
| + const std::string& ip, |
| + int port, |
| + const std::string& frontend_url, |
| + DevToolsHttpHandlerDelegate* delegate); |
| + |
| + // Called from the main thread in order to stop protocol handler. |
| + // Will schedule tear down task on IO thread. |
| + virtual CONTENT_EXPORT void Stop() = 0; |
| + |
| + protected: |
| + DevToolsHttpHandler() {} |
|
jam
2011/11/21 19:26:56
nit: not necessary
yurys
2011/12/01 18:02:20
Done.
|
| + virtual ~DevToolsHttpHandler() {} |
| + |
| + private: |
| + friend class base::RefCountedThreadSafe<DevToolsHttpHandler>; |
| + |
| + 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.
|
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_H_ |