OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SERVICE_WORKER_SERVICE_WORKER_INFO_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "content/browser/service_worker/service_worker_version.h" | 13 #include "content/browser/service_worker/service_worker_version.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
| 19 enum class EmbeddedWorkerStatus; |
| 20 |
19 struct CONTENT_EXPORT ServiceWorkerVersionInfo { | 21 struct CONTENT_EXPORT ServiceWorkerVersionInfo { |
20 public: | 22 public: |
21 struct CONTENT_EXPORT ClientInfo { | 23 struct CONTENT_EXPORT ClientInfo { |
22 public: | 24 public: |
23 ClientInfo(); | 25 ClientInfo(); |
24 ClientInfo(int process_id, int route_id, ServiceWorkerProviderType type); | 26 ClientInfo(int process_id, int route_id, ServiceWorkerProviderType type); |
25 ~ClientInfo(); | 27 ~ClientInfo(); |
26 int process_id; | 28 int process_id; |
27 int route_id; | 29 int route_id; |
28 ServiceWorkerProviderType type; | 30 ServiceWorkerProviderType type; |
29 }; | 31 }; |
30 | 32 |
31 ServiceWorkerVersionInfo(); | 33 ServiceWorkerVersionInfo(); |
32 ServiceWorkerVersionInfo(ServiceWorkerVersion::RunningStatus running_status, | 34 ServiceWorkerVersionInfo(EmbeddedWorkerStatus running_status, |
33 ServiceWorkerVersion::Status status, | 35 ServiceWorkerVersion::Status status, |
34 const GURL& script_url, | 36 const GURL& script_url, |
35 int64_t registration_id, | 37 int64_t registration_id, |
36 int64_t version_id, | 38 int64_t version_id, |
37 int process_id, | 39 int process_id, |
38 int thread_id, | 40 int thread_id, |
39 int devtools_agent_route_id); | 41 int devtools_agent_route_id); |
40 ServiceWorkerVersionInfo(const ServiceWorkerVersionInfo& other); | 42 ServiceWorkerVersionInfo(const ServiceWorkerVersionInfo& other); |
41 ~ServiceWorkerVersionInfo(); | 43 ~ServiceWorkerVersionInfo(); |
42 | 44 |
43 ServiceWorkerVersion::RunningStatus running_status; | 45 EmbeddedWorkerStatus running_status; |
44 ServiceWorkerVersion::Status status; | 46 ServiceWorkerVersion::Status status; |
45 GURL script_url; | 47 GURL script_url; |
46 int64_t registration_id; | 48 int64_t registration_id; |
47 int64_t version_id; | 49 int64_t version_id; |
48 int process_id; | 50 int process_id; |
49 int thread_id; | 51 int thread_id; |
50 int devtools_agent_route_id; | 52 int devtools_agent_route_id; |
51 base::Time script_response_time; | 53 base::Time script_response_time; |
52 base::Time script_last_modified; | 54 base::Time script_last_modified; |
53 std::map<std::string, ClientInfo> clients; | 55 std::map<std::string, ClientInfo> clients; |
(...skipping 23 matching lines...) Expand all Loading... |
77 ServiceWorkerVersionInfo active_version; | 79 ServiceWorkerVersionInfo active_version; |
78 ServiceWorkerVersionInfo waiting_version; | 80 ServiceWorkerVersionInfo waiting_version; |
79 ServiceWorkerVersionInfo installing_version; | 81 ServiceWorkerVersionInfo installing_version; |
80 | 82 |
81 int64_t stored_version_size_bytes; | 83 int64_t stored_version_size_bytes; |
82 }; | 84 }; |
83 | 85 |
84 } // namespace content | 86 } // namespace content |
85 | 87 |
86 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_ | 88 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_ |
OLD | NEW |