| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "content/browser/service_worker/service_worker_version.h" | 11 #include "content/browser/service_worker/service_worker_version.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 struct CONTENT_EXPORT ServiceWorkerVersionInfo { | 17 struct CONTENT_EXPORT ServiceWorkerVersionInfo { |
| 18 public: | 18 public: |
| 19 struct ClientInfo { |
| 20 public: |
| 21 ClientInfo(); |
| 22 ClientInfo(int process_id, int route_id, ServiceWorkerProviderType type); |
| 23 ~ClientInfo(); |
| 24 int process_id; |
| 25 int route_id; |
| 26 ServiceWorkerProviderType type; |
| 27 }; |
| 28 |
| 19 ServiceWorkerVersionInfo(); | 29 ServiceWorkerVersionInfo(); |
| 20 ServiceWorkerVersionInfo(ServiceWorkerVersion::RunningStatus running_status, | 30 ServiceWorkerVersionInfo(ServiceWorkerVersion::RunningStatus running_status, |
| 21 ServiceWorkerVersion::Status status, | 31 ServiceWorkerVersion::Status status, |
| 22 const GURL& script_url, | 32 const GURL& script_url, |
| 23 int64 registration_id, | 33 int64 registration_id, |
| 24 int64 version_id, | 34 int64 version_id, |
| 25 int process_id, | 35 int process_id, |
| 26 int thread_id, | 36 int thread_id, |
| 27 int devtools_agent_route_id); | 37 int devtools_agent_route_id); |
| 28 ~ServiceWorkerVersionInfo(); | 38 ~ServiceWorkerVersionInfo(); |
| 29 | 39 |
| 30 ServiceWorkerVersion::RunningStatus running_status; | 40 ServiceWorkerVersion::RunningStatus running_status; |
| 31 ServiceWorkerVersion::Status status; | 41 ServiceWorkerVersion::Status status; |
| 32 GURL script_url; | 42 GURL script_url; |
| 33 int64 registration_id; | 43 int64 registration_id; |
| 34 int64 version_id; | 44 int64 version_id; |
| 35 int process_id; | 45 int process_id; |
| 36 int thread_id; | 46 int thread_id; |
| 37 int devtools_agent_route_id; | 47 int devtools_agent_route_id; |
| 38 base::Time script_response_time; | 48 base::Time script_response_time; |
| 39 base::Time script_last_modified; | 49 base::Time script_last_modified; |
| 50 std::map<std::string, ClientInfo> clients; |
| 40 }; | 51 }; |
| 41 | 52 |
| 42 struct CONTENT_EXPORT ServiceWorkerRegistrationInfo { | 53 struct CONTENT_EXPORT ServiceWorkerRegistrationInfo { |
| 43 public: | 54 public: |
| 44 enum DeleteFlag { IS_NOT_DELETED, IS_DELETED }; | 55 enum DeleteFlag { IS_NOT_DELETED, IS_DELETED }; |
| 45 ServiceWorkerRegistrationInfo(); | 56 ServiceWorkerRegistrationInfo(); |
| 46 ServiceWorkerRegistrationInfo(const GURL& pattern, | 57 ServiceWorkerRegistrationInfo(const GURL& pattern, |
| 47 int64 registration_id, | 58 int64 registration_id, |
| 48 DeleteFlag delete_flag); | 59 DeleteFlag delete_flag); |
| 49 ServiceWorkerRegistrationInfo( | 60 ServiceWorkerRegistrationInfo( |
| (...skipping 12 matching lines...) Expand all Loading... |
| 62 ServiceWorkerVersionInfo active_version; | 73 ServiceWorkerVersionInfo active_version; |
| 63 ServiceWorkerVersionInfo waiting_version; | 74 ServiceWorkerVersionInfo waiting_version; |
| 64 ServiceWorkerVersionInfo installing_version; | 75 ServiceWorkerVersionInfo installing_version; |
| 65 | 76 |
| 66 int64_t stored_version_size_bytes; | 77 int64_t stored_version_size_bytes; |
| 67 }; | 78 }; |
| 68 | 79 |
| 69 } // namespace content | 80 } // namespace content |
| 70 | 81 |
| 71 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_ | 82 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_ |
| OLD | NEW |