OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PROTOCOL_TARGET_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TARGET_HANDLER_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TARGET_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TARGET_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
| 11 #include "content/browser/devtools/protocol/devtools_domain_handler.h" |
11 #include "content/browser/devtools/protocol/target.h" | 12 #include "content/browser/devtools/protocol/target.h" |
12 #include "content/browser/devtools/service_worker_devtools_manager.h" | 13 #include "content/browser/devtools/service_worker_devtools_manager.h" |
13 #include "content/public/browser/devtools_agent_host_client.h" | 14 #include "content/public/browser/devtools_agent_host_client.h" |
14 #include "content/public/browser/devtools_agent_host_observer.h" | 15 #include "content/public/browser/devtools_agent_host_observer.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 | 18 |
18 class RenderFrameHostImpl; | 19 class RenderFrameHostImpl; |
19 | 20 |
20 namespace protocol { | 21 namespace protocol { |
21 | 22 |
22 class TargetHandler : public Target::Backend, | 23 class TargetHandler : public DevToolsDomainHandler, |
| 24 public Target::Backend, |
23 public DevToolsAgentHostClient, | 25 public DevToolsAgentHostClient, |
24 public ServiceWorkerDevToolsManager::Observer, | 26 public ServiceWorkerDevToolsManager::Observer, |
25 public DevToolsAgentHostObserver { | 27 public DevToolsAgentHostObserver { |
26 public: | 28 public: |
27 TargetHandler(); | 29 TargetHandler(); |
28 ~TargetHandler() override; | 30 ~TargetHandler() override; |
29 | 31 |
30 void Wire(UberDispatcher*); | 32 void Wire(UberDispatcher* dispatcher) override; |
31 void SetRenderFrameHost(RenderFrameHostImpl* render_frame_host); | 33 void SetRenderFrameHost(RenderFrameHostImpl* host) override; |
32 Response Disable() override; | 34 Response Disable() override; |
33 | 35 |
34 void UpdateServiceWorkers(); | 36 void UpdateServiceWorkers(); |
35 void UpdateFrames(); | 37 void UpdateFrames(); |
36 | 38 |
37 // Domain implementation. | 39 // Domain implementation. |
38 Response SetDiscoverTargets(bool discover) override; | 40 Response SetDiscoverTargets(bool discover) override; |
39 Response SetAutoAttach(bool auto_attach, | 41 Response SetAutoAttach(bool auto_attach, |
40 bool wait_for_debugger_on_start) override; | 42 bool wait_for_debugger_on_start) override; |
41 Response SetAttachToFrames(bool value) override; | 43 Response SetAttachToFrames(bool value) override; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 std::set<GURL> frame_urls_; | 108 std::set<GURL> frame_urls_; |
107 RawHostsMap reported_hosts_; | 109 RawHostsMap reported_hosts_; |
108 | 110 |
109 DISALLOW_COPY_AND_ASSIGN(TargetHandler); | 111 DISALLOW_COPY_AND_ASSIGN(TargetHandler); |
110 }; | 112 }; |
111 | 113 |
112 } // namespace protocol | 114 } // namespace protocol |
113 } // namespace content | 115 } // namespace content |
114 | 116 |
115 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TARGET_HANDLER_H_ | 117 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TARGET_HANDLER_H_ |
OLD | NEW |