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

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

Issue 2289773002: Revert of DevTools: merge devtools target with devtools host, part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
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/protocol/inspector_handler.h" 8 #include "content/browser/devtools/protocol/inspector_handler.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 ForwardingAgentHost::ForwardingAgentHost( 12 ForwardingAgentHost::ForwardingAgentHost(
13 DevToolsExternalAgentProxyDelegate* delegate) 13 DevToolsExternalAgentProxyDelegate* delegate)
14 : DevToolsAgentHostImpl(delegate->GetId()), 14 : delegate_(delegate) {
15 delegate_(delegate) {
16 } 15 }
17 16
18 ForwardingAgentHost::~ForwardingAgentHost() { 17 ForwardingAgentHost::~ForwardingAgentHost() {
19 } 18 }
20 19
21 void ForwardingAgentHost::DispatchOnClientHost(const std::string& message) { 20 void ForwardingAgentHost::DispatchOnClientHost(const std::string& message) {
22 SendMessageToClient(session_id(), message); 21 SendMessageToClient(session_id(), message);
23 } 22 }
24 23
25 void ForwardingAgentHost::ConnectionClosed() { 24 void ForwardingAgentHost::ConnectionClosed() {
26 HostClosed(); 25 HostClosed();
27 } 26 }
28 27
29 void ForwardingAgentHost::Attach() { 28 void ForwardingAgentHost::Attach() {
30 delegate_->Attach(this); 29 delegate_->Attach(this);
31 } 30 }
32 31
33 void ForwardingAgentHost::Detach() { 32 void ForwardingAgentHost::Detach() {
34 delegate_->Detach(); 33 delegate_->Detach();
35 } 34 }
36 35
37 bool ForwardingAgentHost::DispatchProtocolMessage( 36 bool ForwardingAgentHost::DispatchProtocolMessage(
38 const std::string& message) { 37 const std::string& message) {
39 delegate_->SendMessageToBackend(message); 38 delegate_->SendMessageToBackend(message);
40 return true; 39 return true;
41 } 40 }
42 41
43 std::string ForwardingAgentHost::GetType() { 42 DevToolsAgentHost::Type ForwardingAgentHost::GetType() {
44 return delegate_->GetType(); 43 return TYPE_EXTERNAL;
45 } 44 }
46 45
47 std::string ForwardingAgentHost::GetTitle() { 46 std::string ForwardingAgentHost::GetTitle() {
48 return delegate_->GetTitle(); 47 return "";
49 } 48 }
50 49
51 GURL ForwardingAgentHost::GetURL() { 50 GURL ForwardingAgentHost::GetURL() {
52 return delegate_->GetURL(); 51 return GURL();
53 }
54
55 GURL ForwardingAgentHost::GetFaviconURL() {
56 return delegate_->GetFaviconURL();
57 } 52 }
58 53
59 bool ForwardingAgentHost::Activate() { 54 bool ForwardingAgentHost::Activate() {
60 return delegate_->Activate(); 55 return false;
61 }
62
63 bool ForwardingAgentHost::Inspect() {
64 return delegate_->Inspect();
65 }
66
67 void ForwardingAgentHost::Reload() {
68 delegate_->Reload();
69 } 56 }
70 57
71 bool ForwardingAgentHost::Close() { 58 bool ForwardingAgentHost::Close() {
72 return delegate_->Close(); 59 return false;
73 } 60 }
74 61
75 } // content 62 } // content
OLDNEW
« no previous file with comments | « content/browser/devtools/forwarding_agent_host.h ('k') | content/browser/devtools/protocol/browser_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698