OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SERVICE_WORKER_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "content/browser/devtools/protocol/devtools_protocol_handler.h" | 11 #include "content/browser/devtools/protocol/devtools_protocol_handler.h" |
12 #include "content/browser/devtools/service_worker_devtools_agent_host.h" | 12 #include "content/browser/devtools/service_worker_devtools_agent_host.h" |
13 #include "content/browser/devtools/service_worker_devtools_manager.h" | 13 #include "content/browser/devtools/service_worker_devtools_manager.h" |
| 14 #include "content/browser/service_worker/service_worker_context_observer.h" |
14 #include "content/browser/service_worker/service_worker_info.h" | 15 #include "content/browser/service_worker/service_worker_info.h" |
15 #include "content/public/browser/devtools_agent_host.h" | 16 #include "content/public/browser/devtools_agent_host.h" |
16 #include "content/public/browser/devtools_agent_host_client.h" | 17 #include "content/public/browser/devtools_agent_host_client.h" |
17 | 18 |
18 // Windows headers will redefine SendMessage. | 19 // Windows headers will redefine SendMessage. |
19 #ifdef SendMessage | 20 #ifdef SendMessage |
20 #undef SendMessage | 21 #undef SendMessage |
21 #endif | 22 #endif |
22 | 23 |
23 namespace content { | 24 namespace content { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void AgentHostClosed(DevToolsAgentHost* agent_host, | 66 void AgentHostClosed(DevToolsAgentHost* agent_host, |
66 bool replaced_with_another_client) override; | 67 bool replaced_with_another_client) override; |
67 | 68 |
68 void ReportWorkerCreated(ServiceWorkerDevToolsAgentHost* host); | 69 void ReportWorkerCreated(ServiceWorkerDevToolsAgentHost* host); |
69 void ReportWorkerTerminated(ServiceWorkerDevToolsAgentHost* host); | 70 void ReportWorkerTerminated(ServiceWorkerDevToolsAgentHost* host); |
70 | 71 |
71 void OnWorkerRegistrationUpdated( | 72 void OnWorkerRegistrationUpdated( |
72 const std::vector<ServiceWorkerRegistrationInfo>& registrations); | 73 const std::vector<ServiceWorkerRegistrationInfo>& registrations); |
73 void OnWorkerVersionUpdated( | 74 void OnWorkerVersionUpdated( |
74 const std::vector<ServiceWorkerVersionInfo>& registrations); | 75 const std::vector<ServiceWorkerVersionInfo>& registrations); |
| 76 void OnErrorReported(int64 registration_id, |
| 77 int64 version_id, |
| 78 const ServiceWorkerContextObserver::ErrorInfo& info); |
75 | 79 |
76 void OpenNewDevToolsWindow(int process_id, int devtools_agent_route_id); | 80 void OpenNewDevToolsWindow(int process_id, int devtools_agent_route_id); |
77 | 81 |
78 scoped_refptr<ServiceWorkerContextWrapper> context_; | 82 scoped_refptr<ServiceWorkerContextWrapper> context_; |
79 scoped_ptr<Client> client_; | 83 scoped_ptr<Client> client_; |
80 ServiceWorkerDevToolsAgentHost::Map attached_hosts_; | 84 ServiceWorkerDevToolsAgentHost::Map attached_hosts_; |
81 bool enabled_; | 85 bool enabled_; |
82 std::set<GURL> urls_; | 86 std::set<GURL> urls_; |
83 scoped_refptr<ServiceWorkerContextWatcher> context_watcher_; | 87 scoped_refptr<ServiceWorkerContextWatcher> context_watcher_; |
84 RenderFrameHostImpl* render_frame_host_; | 88 RenderFrameHostImpl* render_frame_host_; |
85 | 89 |
86 base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_; | 90 base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_; |
87 | 91 |
88 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandler); | 92 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandler); |
89 }; | 93 }; |
90 | 94 |
91 } // namespace service_worker | 95 } // namespace service_worker |
92 } // namespace devtools | 96 } // namespace devtools |
93 } // namespace content | 97 } // namespace content |
94 | 98 |
95 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ | 99 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ |
OLD | NEW |