blob: 25d701688b34ddf2281bc217abbf441281ce089b [file] [log] [blame]
[email protected]cb286af2013-03-26 12:46:451// Copyright (c) 2013 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_EXTERNAL_AGENT_PROXY_H_
6#define CONTENT_PUBLIC_BROWSER_DEVTOOLS_EXTERNAL_AGENT_PROXY_H_
7
8#include <string>
9
10#include "content/common/content_export.h"
11
12namespace content {
13
14class DevToolsAgentHost;
15class DevToolsExternalAgentProxyDelegate;
16
17// Describes interface for communication with an external DevTools agent.
18class DevToolsExternalAgentProxy {
19 public:
20 // Creates DevToolsExternalAgentProxy to communicate with an agent
21 // via the provided |delegate|.
22 // Caller get the proxy ownership and keeps the |delegate| ownership.
23 static CONTENT_EXPORT DevToolsExternalAgentProxy* Create(
24 DevToolsExternalAgentProxyDelegate* delegate);
25
26 // Returns the local DevToolsAgentHost for the external agent.
27 virtual scoped_refptr<DevToolsAgentHost> GetAgentHost() = 0;
28
[email protected]94305ee92013-04-01 14:19:5829 // Sends the message to the client host.
30 virtual void DispatchOnClientHost(const std::string& message) = 0;
31
[email protected]cb286af2013-03-26 12:46:4532 // Informs the client that the connection has closed.
33 virtual void ConnectionClosed() = 0;
34
35 virtual ~DevToolsExternalAgentProxy() {}
36};
37
38} // namespace content
39
40#endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_EXTERNAL_AGENT_PROXY_H_