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

Unified Diff: content/public/browser/devtools_frontend_host.h

Issue 427143003: [DevTools] Move DevToolsClientHost functionality out of DevToolsFrontendHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/devtools_frontend_host.h
diff --git a/content/public/browser/devtools_frontend_host.h b/content/public/browser/devtools_frontend_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..2d9fd03a7dcb1f8386e01fd0a5a3c95ba5f9f63d
--- /dev/null
+++ b/content/public/browser/devtools_frontend_host.h
@@ -0,0 +1,53 @@
+// Copyright (c) 2012 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_FRONTEND_HOST_H_
+#define CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_H_
+
+#include <string>
+
+#include "content/common/content_export.h"
+
+namespace content {
+
+class RenderViewHost;
+
+// This class dispatches messages between DevTools frontend and Delegate
+// which is implemented by the embedder.
+// This allows us to avoid exposing DevTools frontend messages through
+// the content public API.
+class DevToolsFrontendHost {
+ public:
+ // Delegate actually handles messages from frontend.
+ class Delegate {
+ public:
+ virtual ~Delegate() {}
+
+ // Message is coming from frontend to the embedder.
+ virtual void HandleMessageFromDevToolsFrontend(
+ const std::string& message) = 0;
+
+ // Message is coming from frontend to the backend.
+ // TODO(dgozman): remove this by making one of the possible messages
+ // passed via the method above.
+ virtual void HandleMessageFromDevToolsFrontendToBackend(
jam 2014/07/31 22:05:47 nit: once this is removed, please change the singl
dgozman 2014/08/01 10:01:25 Sure!
+ const std::string& message) = 0;
+ };
+
+ // Creates a new DevToolsFrontendHost for RenderViewHost where DevTools
+ // frontend is loaded.
+ CONTENT_EXPORT static DevToolsFrontendHost* Create(
+ RenderViewHost* frontend_rvh, Delegate* delegate);
+
+ CONTENT_EXPORT virtual ~DevToolsFrontendHost() {}
+
+ // Dispatches message from embedder/backend to frontend.
+ // TODO(dgozman): remove and make embedder to take care of this.
+ CONTENT_EXPORT virtual void DispatchOnDevToolsFrontend(
+ const std::string& message) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_H_
« no previous file with comments | « content/public/browser/devtools_client_host.h ('k') | content/public/browser/devtools_frontend_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698