| 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 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 Response Enable(); | 37 Response Enable(); |
| 38 Response Disable(); | 38 Response Disable(); |
| 39 Response SetWaitForDebuggerOnStart(bool value); | 39 Response SetWaitForDebuggerOnStart(bool value); |
| 40 Response SendMessageToTarget(const std::string& target_id, | 40 Response SendMessageToTarget(const std::string& target_id, |
| 41 const std::string& message); | 41 const std::string& message); |
| 42 Response GetTargetInfo(const std::string& target_id, | 42 Response GetTargetInfo(const std::string& target_id, |
| 43 scoped_refptr<TargetInfo>* target_info); | 43 scoped_refptr<TargetInfo>* target_info); |
| 44 Response ActivateTarget(const std::string& target_id); | 44 Response ActivateTarget(const std::string& target_id); |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 void UpdateServiceWorkers(bool waiting_for_debugger); |
| 47 void AttachToTargetInternal(DevToolsAgentHost* host, | 48 void AttachToTargetInternal(DevToolsAgentHost* host, |
| 48 bool waiting_for_debugger); | 49 bool waiting_for_debugger); |
| 49 void DetachFromTargetInternal(DevToolsAgentHost* host); | 50 void DetachFromTargetInternal(DevToolsAgentHost* host); |
| 50 | 51 |
| 51 // ServiceWorkerDevToolsManager::Observer implementation. | 52 // ServiceWorkerDevToolsManager::Observer implementation. |
| 52 void WorkerCreated(ServiceWorkerDevToolsAgentHost* host) override; | 53 void WorkerCreated(ServiceWorkerDevToolsAgentHost* host) override; |
| 53 void WorkerReadyForInspection(ServiceWorkerDevToolsAgentHost* host) override; | 54 void WorkerReadyForInspection(ServiceWorkerDevToolsAgentHost* host) override; |
| 54 void WorkerVersionInstalled(ServiceWorkerDevToolsAgentHost* host) override; | 55 void WorkerVersionInstalled(ServiceWorkerDevToolsAgentHost* host) override; |
| 55 void WorkerVersionDoomed(ServiceWorkerDevToolsAgentHost* host) override; | 56 void WorkerVersionDoomed(ServiceWorkerDevToolsAgentHost* host) override; |
| 56 void WorkerDestroyed(ServiceWorkerDevToolsAgentHost* host) override; | 57 void WorkerDestroyed(ServiceWorkerDevToolsAgentHost* host) override; |
| 57 | 58 |
| 58 // DevToolsAgentHostClient implementation. | 59 // DevToolsAgentHostClient implementation. |
| 59 void DispatchProtocolMessage(DevToolsAgentHost* agent_host, | 60 void DispatchProtocolMessage(DevToolsAgentHost* agent_host, |
| 60 const std::string& message) override; | 61 const std::string& message) override; |
| 61 void AgentHostClosed(DevToolsAgentHost* agent_host, | 62 void AgentHostClosed(DevToolsAgentHost* agent_host, |
| 62 bool replaced_with_another_client) override; | 63 bool replaced_with_another_client) override; |
| 63 | 64 |
| 64 std::unique_ptr<Client> client_; | 65 std::unique_ptr<Client> client_; |
| 65 bool enabled_; | 66 bool enabled_; |
| 67 bool wait_for_debugger_on_start_; |
| 66 RenderFrameHostImpl* render_frame_host_; | 68 RenderFrameHostImpl* render_frame_host_; |
| 67 std::map<std::string, scoped_refptr<DevToolsAgentHost>> attached_hosts_; | 69 std::map<std::string, scoped_refptr<DevToolsAgentHost>> attached_hosts_; |
| 68 std::set<GURL> frame_urls_; | 70 std::set<GURL> frame_urls_; |
| 69 | 71 |
| 70 DISALLOW_COPY_AND_ASSIGN(TargetHandler); | 72 DISALLOW_COPY_AND_ASSIGN(TargetHandler); |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 } // namespace target | 75 } // namespace target |
| 74 } // namespace devtools | 76 } // namespace devtools |
| 75 } // namespace content | 77 } // namespace content |
| 76 | 78 |
| 77 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TARGET_HANDLER_H_ | 79 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TARGET_HANDLER_H_ |
| OLD | NEW |