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> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "content/browser/devtools/protocol/devtools_domain_handler.h" | 14 #include "content/browser/devtools/protocol/devtools_domain_handler.h" |
15 #include "content/browser/devtools/protocol/service_worker.h" | 15 #include "content/browser/devtools/protocol/service_worker.h" |
16 #include "content/browser/devtools/service_worker_devtools_agent_host.h" | 16 #include "content/browser/devtools/service_worker_devtools_agent_host.h" |
17 #include "content/browser/devtools/service_worker_devtools_manager.h" | 17 #include "content/browser/devtools/service_worker_devtools_manager.h" |
18 #include "content/browser/service_worker/service_worker_context_observer.h" | 18 #include "content/browser/service_worker/service_worker_context_core_observer.h" |
19 #include "content/browser/service_worker/service_worker_info.h" | 19 #include "content/browser/service_worker/service_worker_info.h" |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 class RenderFrameHostImpl; | 23 class RenderFrameHostImpl; |
24 class ServiceWorkerContextWatcher; | 24 class ServiceWorkerContextWatcher; |
25 class ServiceWorkerContextWrapper; | 25 class ServiceWorkerContextWrapper; |
26 | 26 |
27 namespace protocol { | 27 namespace protocol { |
28 | 28 |
(...skipping 23 matching lines...) Expand all Loading... |
52 const std::string& tag, | 52 const std::string& tag, |
53 bool last_chance) override; | 53 bool last_chance) override; |
54 | 54 |
55 private: | 55 private: |
56 void OnWorkerRegistrationUpdated( | 56 void OnWorkerRegistrationUpdated( |
57 const std::vector<ServiceWorkerRegistrationInfo>& registrations); | 57 const std::vector<ServiceWorkerRegistrationInfo>& registrations); |
58 void OnWorkerVersionUpdated( | 58 void OnWorkerVersionUpdated( |
59 const std::vector<ServiceWorkerVersionInfo>& registrations); | 59 const std::vector<ServiceWorkerVersionInfo>& registrations); |
60 void OnErrorReported(int64_t registration_id, | 60 void OnErrorReported(int64_t registration_id, |
61 int64_t version_id, | 61 int64_t version_id, |
62 const ServiceWorkerContextObserver::ErrorInfo& info); | 62 const ServiceWorkerContextCoreObserver::ErrorInfo& info); |
63 | 63 |
64 void OpenNewDevToolsWindow(int process_id, int devtools_agent_route_id); | 64 void OpenNewDevToolsWindow(int process_id, int devtools_agent_route_id); |
65 void ClearForceUpdate(); | 65 void ClearForceUpdate(); |
66 | 66 |
67 scoped_refptr<ServiceWorkerContextWrapper> context_; | 67 scoped_refptr<ServiceWorkerContextWrapper> context_; |
68 std::unique_ptr<ServiceWorker::Frontend> frontend_; | 68 std::unique_ptr<ServiceWorker::Frontend> frontend_; |
69 bool enabled_; | 69 bool enabled_; |
70 scoped_refptr<ServiceWorkerContextWatcher> context_watcher_; | 70 scoped_refptr<ServiceWorkerContextWatcher> context_watcher_; |
71 RenderFrameHostImpl* render_frame_host_; | 71 RenderFrameHostImpl* render_frame_host_; |
72 | 72 |
73 base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_; | 73 base::WeakPtrFactory<ServiceWorkerHandler> weak_factory_; |
74 | 74 |
75 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandler); | 75 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandler); |
76 }; | 76 }; |
77 | 77 |
78 } // namespace protocol | 78 } // namespace protocol |
79 } // namespace content | 79 } // namespace content |
80 | 80 |
81 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ | 81 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_ |
OLD | NEW |