| OLD | NEW |
| 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 { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 void ForwardingAgentHost::Attach() { | 33 void ForwardingAgentHost::Attach() { |
| 34 if (delegate_) | 34 if (delegate_) |
| 35 delegate_->Attach(this); | 35 delegate_->Attach(this); |
| 36 } | 36 } |
| 37 | 37 |
| 38 void ForwardingAgentHost::Detach() { | 38 void ForwardingAgentHost::Detach() { |
| 39 if (delegate_) | 39 if (delegate_) |
| 40 delegate_->Detach(); | 40 delegate_->Detach(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void ForwardingAgentHost::DispatchProtocolMessage( | 43 bool ForwardingAgentHost::DispatchProtocolMessage( |
| 44 const std::string& message) { | 44 const std::string& message) { |
| 45 if (delegate_) | 45 if (delegate_) |
| 46 delegate_->SendMessageToBackend(message); | 46 delegate_->SendMessageToBackend(message); |
| 47 return true; |
| 47 } | 48 } |
| 48 | 49 |
| 49 DevToolsAgentHost::Type ForwardingAgentHost::GetType() { | 50 DevToolsAgentHost::Type ForwardingAgentHost::GetType() { |
| 50 return TYPE_EXTERNAL; | 51 return TYPE_EXTERNAL; |
| 51 } | 52 } |
| 52 | 53 |
| 53 std::string ForwardingAgentHost::GetTitle() { | 54 std::string ForwardingAgentHost::GetTitle() { |
| 54 return ""; | 55 return ""; |
| 55 } | 56 } |
| 56 | 57 |
| 57 GURL ForwardingAgentHost::GetURL() { | 58 GURL ForwardingAgentHost::GetURL() { |
| 58 return GURL(); | 59 return GURL(); |
| 59 } | 60 } |
| 60 | 61 |
| 61 bool ForwardingAgentHost::Activate() { | 62 bool ForwardingAgentHost::Activate() { |
| 62 return false; | 63 return false; |
| 63 } | 64 } |
| 64 | 65 |
| 65 bool ForwardingAgentHost::Close() { | 66 bool ForwardingAgentHost::Close() { |
| 66 return false; | 67 return false; |
| 67 } | 68 } |
| 68 | 69 |
| 69 } // content | 70 } // content |
| OLD | NEW |