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

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

Issue 12950002: Introduce DevToolsExternalAgentProxy interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 years, 9 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_remote_agent_connector.h
diff --git a/content/public/browser/devtools_remote_agent_connector.h b/content/public/browser/devtools_remote_agent_connector.h
new file mode 100644
index 0000000000000000000000000000000000000000..814801e24b856656b47e240c4b723349465a52b1
--- /dev/null
+++ b/content/public/browser/devtools_remote_agent_connector.h
@@ -0,0 +1,49 @@
+// Copyright (c) 2013 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_REMOTE_AGENT_CONNECTOR_H_
+#define CONTENT_PUBLIC_BROWSER_DEVTOOLS_REMOTE_AGENT_CONNECTOR_H_
+
+#include "content/common/content_export.h"
+
+namespace content {
+
+class DevToolsAgentHost;
+
+// Describes interface for sending messages to a remote DevTools agent.
+class CONTENT_EXPORT DevToolsRemoteAgentConnector {
pfeldman 2013/03/21 06:24:32 "Connector" does not give me enough information, I
Vladislav Kaznacheev 2013/03/21 06:55:53 It does sound better but still not good enough. Ho
+ public:
+
pfeldman 2013/03/21 06:24:32 Extra blank line.
Vladislav Kaznacheev 2013/03/21 06:55:53 Done.
+ class Delegate {
+ public:
+ // Informs the remote agent that DevToolsAgentHost attached.
+ virtual void Attach() {};
+
+ // Informs the remote agent that DevToolsAgentHost detached.
+ virtual void Detach() {};
+
+ // Sends a message to a remote agent.
+ virtual void Send(const std::string& message) {};
pfeldman 2013/03/21 06:24:32 SendMessageToBackend
Vladislav Kaznacheev 2013/03/21 06:55:53 Done.
+
+ protected:
+ virtual ~Delegate() {}
+ };
+
+ // Creates DevToolsAgentHost that communicates with a remote agent via
+ // the provided |delegate|.
+ // The |delegate| object is not owned by the connector.
pfeldman 2013/03/21 06:24:32 It is not clear it creates DevToolsAgentHost from
Vladislav Kaznacheev 2013/03/21 06:55:53 "creates DevToolsAgentHost" was a typo. Changed th
+ static DevToolsRemoteAgentConnector* CreateFor(Delegate* delegate);
+
+ // Returns the agent host associated with this connector.
+ virtual DevToolsAgentHost* GetAgentHost() = 0;
pfeldman 2013/03/21 06:24:32 What does associated with the connector mean?
Vladislav Kaznacheev 2013/03/21 06:55:53 Changed to "Returns the local DevToolsAgentHost fo
+
+ // To be called when the connection is closed.
+ virtual void ConnectionClosed() = 0;
pfeldman 2013/03/21 06:24:32 Adding convenience DispatchMessageFromFrontend wou
Vladislav Kaznacheev 2013/03/21 06:55:53 Cannot remove the getter as we need to pass DevToo
+
+ virtual ~DevToolsRemoteAgentConnector() {}
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_REMOTE_AGENT_CONNECTOR_H_

Powered by Google App Engine
This is Rietveld 408576698