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

Side by Side Diff: content/browser/devtools/forwarding_agent_host.cc

Issue 449043002: [DevTools] Make DevTools clients talk directly to DevToolsAgentHost instead of using DevToolsManage… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed DetachAllClients Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/devtools/forwarding_agent_host.h" 5 #include "content/browser/devtools/forwarding_agent_host.h"
6 6
7 #include "content/browser/devtools/devtools_manager_impl.h" 7 #include "content/browser/devtools/devtools_manager_impl.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 ForwardingAgentHost::ForwardingAgentHost( 11 ForwardingAgentHost::ForwardingAgentHost(
12 DevToolsExternalAgentProxyDelegate* delegate) 12 DevToolsExternalAgentProxyDelegate* delegate)
13 : delegate_(delegate) { 13 : delegate_(delegate) {
14 } 14 }
15 15
16 ForwardingAgentHost::~ForwardingAgentHost() { 16 ForwardingAgentHost::~ForwardingAgentHost() {
17 } 17 }
18 18
19 void ForwardingAgentHost::DispatchOnClientHost(const std::string& message) { 19 void ForwardingAgentHost::DispatchOnClientHost(const std::string& message) {
20 DevToolsManagerImpl::GetInstance()->DispatchOnInspectorFrontend( 20 SendMessageToClient(message);
21 this, message);
22 } 21 }
23 22
24 void ForwardingAgentHost::ConnectionClosed() { 23 void ForwardingAgentHost::ConnectionClosed() {
25 NotifyCloseListener(); 24 HostClosed();
26 } 25 }
27 26
28 void ForwardingAgentHost::Attach() { 27 void ForwardingAgentHost::Attach() {
29 delegate_->Attach(this); 28 delegate_->Attach(this);
30 } 29 }
31 30
32 void ForwardingAgentHost::Detach() { 31 void ForwardingAgentHost::Detach() {
33 delegate_->Detach(); 32 delegate_->Detach();
34 } 33 }
35 34
36 void ForwardingAgentHost::DispatchOnInspectorBackend( 35 void ForwardingAgentHost::DispatchProtocolMessage(
37 const std::string& message) { 36 const std::string& message) {
38 delegate_->SendMessageToBackend(message); 37 delegate_->SendMessageToBackend(message);
39 } 38 }
40 39
41 } // content 40 } // content
OLDNEW
« no previous file with comments | « content/browser/devtools/forwarding_agent_host.h ('k') | content/browser/devtools/ipc_devtools_agent_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698