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 #ifndef CONTENT_BROWSER_DEVTOOLS_FORWARDING_AGENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_FORWARDING_AGENT_HOST_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_FORWARDING_AGENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_FORWARDING_AGENT_HOST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "content/browser/devtools/devtools_agent_host_impl.h" | 11 #include "content/browser/devtools/devtools_agent_host_impl.h" |
12 #include "content/public/browser/devtools_external_agent_proxy.h" | 12 #include "content/public/browser/devtools_external_agent_proxy.h" |
13 #include "content/public/browser/devtools_external_agent_proxy_delegate.h" | 13 #include "content/public/browser/devtools_external_agent_proxy_delegate.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 class ForwardingAgentHost | 17 class ForwardingAgentHost |
18 : public DevToolsAgentHostImpl, | 18 : public DevToolsAgentHostImpl, |
19 public DevToolsExternalAgentProxy { | 19 public DevToolsExternalAgentProxy { |
20 public: | 20 public: |
21 ForwardingAgentHost(DevToolsExternalAgentProxyDelegate* delegate); | 21 ForwardingAgentHost( |
| 22 const std::string& id, |
| 23 std::unique_ptr<DevToolsExternalAgentProxyDelegate> delegate); |
22 | 24 |
23 private: | 25 private: |
24 ~ForwardingAgentHost() override; | 26 ~ForwardingAgentHost() override; |
25 | 27 |
26 // DevToolsExternalAgentProxy implementation. | 28 // DevToolsExternalAgentProxy implementation. |
27 void DispatchOnClientHost(const std::string& message) override; | 29 void DispatchOnClientHost(const std::string& message) override; |
28 void ConnectionClosed() override; | 30 void ConnectionClosed() override; |
29 | 31 |
30 // DevToolsAgentHostImpl implementation. | 32 // DevToolsAgentHostImpl implementation. |
31 void Attach() override; | 33 void Attach() override; |
(...skipping 12 matching lines...) Expand all Loading... |
44 | 46 |
45 std::unique_ptr<DevToolsExternalAgentProxyDelegate> delegate_; | 47 std::unique_ptr<DevToolsExternalAgentProxyDelegate> delegate_; |
46 std::string type_; | 48 std::string type_; |
47 std::string title_; | 49 std::string title_; |
48 GURL url_; | 50 GURL url_; |
49 }; | 51 }; |
50 | 52 |
51 } // namespace content | 53 } // namespace content |
52 | 54 |
53 #endif // CONTENT_BROWSER_DEVTOOLS_FORWARDING_AGENT_HOST_H_ | 55 #endif // CONTENT_BROWSER_DEVTOOLS_FORWARDING_AGENT_HOST_H_ |
OLD | NEW |