OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/devtools_http_handler_impl.h" | 5 #include "content/browser/devtools/devtools_http_handler_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 : public DevToolsHttpHandler::DevToolsAgentHostBinding { | 78 : public DevToolsHttpHandler::DevToolsAgentHostBinding { |
79 public: | 79 public: |
80 DevToolsDefaultBindingHandler() { | 80 DevToolsDefaultBindingHandler() { |
81 } | 81 } |
82 | 82 |
83 virtual std::string GetIdentifier(DevToolsAgentHost* agent_host) OVERRIDE { | 83 virtual std::string GetIdentifier(DevToolsAgentHost* agent_host) OVERRIDE { |
84 return agent_host->GetId(); | 84 return agent_host->GetId(); |
85 } | 85 } |
86 | 86 |
87 virtual DevToolsAgentHost* ForIdentifier(const std::string& id) OVERRIDE { | 87 virtual DevToolsAgentHost* ForIdentifier(const std::string& id) OVERRIDE { |
88 return DevToolsAgentHost::GetForId(id); | 88 return DevToolsAgentHost::GetForId(id).get(); |
89 } | 89 } |
90 }; | 90 }; |
91 | 91 |
92 // An internal implementation of DevToolsClientHost that delegates | 92 // An internal implementation of DevToolsClientHost that delegates |
93 // messages sent for DevToolsClient to a DebuggerShell instance. | 93 // messages sent for DevToolsClient to a DebuggerShell instance. |
94 class DevToolsClientHostImpl : public DevToolsClientHost { | 94 class DevToolsClientHostImpl : public DevToolsClientHost { |
95 public: | 95 public: |
96 DevToolsClientHostImpl(base::MessageLoop* message_loop, | 96 DevToolsClientHostImpl(base::MessageLoop* message_loop, |
97 net::HttpServer* server, | 97 net::HttpServer* server, |
98 int connection_id) | 98 int connection_id) |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 host.c_str(), | 886 host.c_str(), |
887 kPageUrlPrefix, | 887 kPageUrlPrefix, |
888 id.c_str())); | 888 id.c_str())); |
889 std::string devtools_frontend_url = GetFrontendURLInternal( | 889 std::string devtools_frontend_url = GetFrontendURLInternal( |
890 id.c_str(), | 890 id.c_str(), |
891 host); | 891 host); |
892 dictionary->SetString(kTargetDevtoolsFrontendUrlField, devtools_frontend_url); | 892 dictionary->SetString(kTargetDevtoolsFrontendUrlField, devtools_frontend_url); |
893 } | 893 } |
894 | 894 |
895 } // namespace content | 895 } // namespace content |
OLD | NEW |