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

Unified Diff: content/public/browser/devtools/devtools_http_handler.h

Issue 8554008: Add content API for DevTools HTTP handler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Optimized includes Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698