Chromium Code Reviews| 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; | |
| 48 } | |
| 49 return false; | |
|
pfeldman
2015/03/23 09:59:01
you should always report this command as handled.
Kunihiko Sakamoto
2015/03/23 10:23:58
Done.
| |
| 47 } | 50 } |
| 48 | 51 |
| 49 DevToolsAgentHost::Type ForwardingAgentHost::GetType() { | 52 DevToolsAgentHost::Type ForwardingAgentHost::GetType() { |
| 50 return TYPE_EXTERNAL; | 53 return TYPE_EXTERNAL; |
| 51 } | 54 } |
| 52 | 55 |
| 53 std::string ForwardingAgentHost::GetTitle() { | 56 std::string ForwardingAgentHost::GetTitle() { |
| 54 return ""; | 57 return ""; |
| 55 } | 58 } |
| 56 | 59 |
| 57 GURL ForwardingAgentHost::GetURL() { | 60 GURL ForwardingAgentHost::GetURL() { |
| 58 return GURL(); | 61 return GURL(); |
| 59 } | 62 } |
| 60 | 63 |
| 61 bool ForwardingAgentHost::Activate() { | 64 bool ForwardingAgentHost::Activate() { |
| 62 return false; | 65 return false; |
| 63 } | 66 } |
| 64 | 67 |
| 65 bool ForwardingAgentHost::Close() { | 68 bool ForwardingAgentHost::Close() { |
| 66 return false; | 69 return false; |
| 67 } | 70 } |
| 68 | 71 |
| 69 } // content | 72 } // content |
| OLD | NEW |