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

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

Issue 2590293003: [DevTools] Rework DevToolsSession interaction with domain handlers. (Closed)
Patch Set: addressed comments Created 4 years 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
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/devtools/devtools_session.h" 8 #include "content/browser/devtools/devtools_session.h"
9 #include "content/browser/devtools/protocol/inspector_handler.h" 9 #include "content/browser/devtools/protocol/inspector_handler.h"
10 10
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 void ForwardingAgentHost::DispatchOnClientHost(const std::string& message) { 24 void ForwardingAgentHost::DispatchOnClientHost(const std::string& message) {
25 SendMessageToClient(session() ? session()->session_id() : 0, message); 25 SendMessageToClient(session() ? session()->session_id() : 0, message);
26 } 26 }
27 27
28 void ForwardingAgentHost::ConnectionClosed() { 28 void ForwardingAgentHost::ConnectionClosed() {
29 HostClosed(); 29 HostClosed();
30 } 30 }
31 31
32 void ForwardingAgentHost::Attach() { 32 void ForwardingAgentHost::AttachSession(DevToolsSession* session) {
33 delegate_->Attach(this); 33 delegate_->Attach(this);
34 } 34 }
35 35
36 void ForwardingAgentHost::Detach() { 36 void ForwardingAgentHost::DetachSession(int session_id) {
37 delegate_->Detach(); 37 delegate_->Detach();
38 } 38 }
39 39
40 bool ForwardingAgentHost::DispatchProtocolMessage( 40 bool ForwardingAgentHost::DispatchProtocolMessage(
41 DevToolsSession* session,
41 const std::string& message) { 42 const std::string& message) {
42 delegate_->SendMessageToBackend(message); 43 delegate_->SendMessageToBackend(message);
43 return true; 44 return true;
44 } 45 }
45 46
46 std::string ForwardingAgentHost::GetType() { 47 std::string ForwardingAgentHost::GetType() {
47 return delegate_->GetType(); 48 return delegate_->GetType();
48 } 49 }
49 50
50 std::string ForwardingAgentHost::GetTitle() { 51 std::string ForwardingAgentHost::GetTitle() {
(...skipping 18 matching lines...) Expand all
69 70
70 void ForwardingAgentHost::Reload() { 71 void ForwardingAgentHost::Reload() {
71 delegate_->Reload(); 72 delegate_->Reload();
72 } 73 }
73 74
74 bool ForwardingAgentHost::Close() { 75 bool ForwardingAgentHost::Close() {
75 return delegate_->Close(); 76 return delegate_->Close();
76 } 77 }
77 78
78 } // content 79 } // content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698