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 <stdint.h> |
| 9 |
8 #include <set> | 10 #include <set> |
9 | 11 |
| 12 #include "base/macros.h" |
10 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
11 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" | 14 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" |
12 #include "content/browser/devtools/service_worker_devtools_agent_host.h" | 15 #include "content/browser/devtools/service_worker_devtools_agent_host.h" |
13 #include "content/browser/devtools/service_worker_devtools_manager.h" | 16 #include "content/browser/devtools/service_worker_devtools_manager.h" |
14 #include "content/browser/service_worker/service_worker_context_observer.h" | 17 #include "content/browser/service_worker/service_worker_context_observer.h" |
15 #include "content/browser/service_worker/service_worker_info.h" | 18 #include "content/browser/service_worker/service_worker_info.h" |
16 #include "content/public/browser/devtools_agent_host.h" | 19 #include "content/public/browser/devtools_agent_host.h" |
17 #include "content/public/browser/devtools_agent_host_client.h" | 20 #include "content/public/browser/devtools_agent_host_client.h" |
18 | 21 |
19 // Windows headers will redefine SendMessage. | 22 // Windows headers will redefine SendMessage. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 void AgentHostClosed(DevToolsAgentHost* agent_host, | 80 void AgentHostClosed(DevToolsAgentHost* agent_host, |
78 bool replaced_with_another_client) override; | 81 bool replaced_with_another_client) override; |
79 | 82 |
80 void ReportWorkerCreated(ServiceWorkerDevToolsAgentHost* host); | 83 void ReportWorkerCreated(ServiceWorkerDevToolsAgentHost* host); |
81 void ReportWorkerTerminated(ServiceWorkerDevToolsAgentHost* host); | 84 void ReportWorkerTerminated(ServiceWorkerDevToolsAgentHost* host); |
82 | 85 |
83 void OnWorkerRegistrationUpdated( | 86 void OnWorkerRegistrationUpdated( |
84 const std::vector<ServiceWorkerRegistrationInfo>& registrations); | 87 const std::vector<ServiceWorkerRegistrationInfo>& registrations); |
85 void OnWorkerVersionUpdated( | 88 void OnWorkerVersionUpdated( |
86 const std::vector<ServiceWorkerVersionInfo>& registrations); | 89 const std::vector<ServiceWorkerVersionInfo>& registrations); |
87 void OnErrorReported(int64 registration_id, | 90 void OnErrorReported(int64_t registration_id, |
88 int64 version_id, | 91 int64_t version_id, |
89 const ServiceWorkerContextObserver::ErrorInfo& info); | 92 const ServiceWorkerContextObserver::ErrorInfo& info); |
90 | 93 |
91 void OpenNewDevToolsWindow(int process_id, int devtools_agent_route_id); | 94 void OpenNewDevToolsWindow(int process_id, int devtools_agent_route_id); |
92 | 95 |
93 scoped_refptr<ServiceWorkerContextWrapper> context_; | 96 scoped_refptr<ServiceWorkerContextWrapper> context_; |
94 scoped_ptr<Client> client_; | 97 scoped_ptr<Client> client_; |
95 ServiceWorkerDevToolsAgentHost::Map attached_hosts_; | 98 ServiceWorkerDevToolsAgentHost::Map attached_hosts_; |
96 bool enabled_; | 99 bool enabled_; |
97 std::set<GURL> urls_; | 100 std::set<GURL> urls_; |
98 scoped_refptr<ServiceWorkerContextWatcher> context_watcher_; | 101 scoped_refptr<ServiceWorkerContextWatcher> context_watcher_; |
99 RenderFrameHostImpl* render_frame_host_; | 102 RenderFrameHostImpl* render_frame_host_; |
100 | 103 |
101 base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_; | 104 base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_; |
102 | 105 |
103 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandler); | 106 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandler); |
104 }; | 107 }; |
105 | 108 |
106 } // namespace service_worker | 109 } // namespace service_worker |
107 } // namespace devtools | 110 } // namespace devtools |
108 } // namespace content | 111 } // namespace content |
109 | 112 |
110 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ | 113 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ |
OLD | NEW |