Roll src/third_party/WebKit 06cb9e9:a978ee5 (svn 202558:202559)
[chromium-blink-merge.git] / content / browser / devtools / forwarding_agent_host.cc
blobef7f82c30f1190c060ad694e703083ca8670b73a
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 "base/bind.h"
8 #include "content/browser/devtools/protocol/inspector_handler.h"
10 namespace content {
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() {
25 HostClosed();
28 void ForwardingAgentHost::Attach() {
29 delegate_->Attach(this);
32 void ForwardingAgentHost::Detach() {
33 delegate_->Detach();
36 bool ForwardingAgentHost::DispatchProtocolMessage(
37 const std::string& message) {
38 delegate_->SendMessageToBackend(message);
39 return true;
42 DevToolsAgentHost::Type ForwardingAgentHost::GetType() {
43 return TYPE_EXTERNAL;
46 std::string ForwardingAgentHost::GetTitle() {
47 return "";
50 GURL ForwardingAgentHost::GetURL() {
51 return GURL();
54 bool ForwardingAgentHost::Activate() {
55 return false;
58 bool ForwardingAgentHost::Close() {
59 return false;
62 } // content