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"
8 #include "content/browser/devtools/protocol/inspector_handler.h"
12 ForwardingAgentHost::ForwardingAgentHost(
13 DevToolsExternalAgentProxyDelegate
* delegate
)
14 : delegate_(delegate
) {
17 ForwardingAgentHost::~ForwardingAgentHost() {
20 void ForwardingAgentHost::DispatchOnClientHost(const std::string
& message
) {
21 SendMessageToClient(message
);
24 void ForwardingAgentHost::ConnectionClosed() {
28 void ForwardingAgentHost::Attach() {
29 delegate_
->Attach(this);
32 void ForwardingAgentHost::Detach() {
36 bool ForwardingAgentHost::DispatchProtocolMessage(
37 const std::string
& message
) {
38 delegate_
->SendMessageToBackend(message
);
42 DevToolsAgentHost::Type
ForwardingAgentHost::GetType() {
46 std::string
ForwardingAgentHost::GetTitle() {
50 GURL
ForwardingAgentHost::GetURL() {
54 bool ForwardingAgentHost::Activate() {
58 bool ForwardingAgentHost::Close() {