1 // Copyright 2014 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.
5 #include "content/browser/devtools/forwarding_agent_host.h"
7 #include "content/browser/devtools/devtools_manager_impl.h"
11 ForwardingAgentHost::ForwardingAgentHost(
12 DevToolsExternalAgentProxyDelegate
* delegate
)
13 : delegate_(delegate
) {
16 ForwardingAgentHost::~ForwardingAgentHost() {
19 void ForwardingAgentHost::DispatchOnClientHost(const std::string
& message
) {
20 SendMessageToClient(message
);
23 void ForwardingAgentHost::ConnectionClosed() {
27 void ForwardingAgentHost::Attach() {
28 delegate_
->Attach(this);
31 void ForwardingAgentHost::Detach() {
35 void ForwardingAgentHost::DispatchProtocolMessage(
36 const std::string
& message
) {
37 delegate_
->SendMessageToBackend(message
);
40 DevToolsAgentHost::Type
ForwardingAgentHost::GetType() {
44 std::string
ForwardingAgentHost::GetTitle() {
48 GURL
ForwardingAgentHost::GetURL() {
52 bool ForwardingAgentHost::Activate() {
56 bool ForwardingAgentHost::Close() {