Roll src/third_party/WebKit eac3800:0237a66 (svn 202606:202607)
[chromium-blink-merge.git] / content / browser / service_worker / service_worker_info.h
blobf7bd894f68bf71dfb308cc613e27134a344d7cd4
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_
8 #include <vector>
10 #include "base/time/time.h"
11 #include "content/browser/service_worker/service_worker_version.h"
12 #include "content/common/content_export.h"
13 #include "url/gurl.h"
15 namespace content {
17 struct CONTENT_EXPORT ServiceWorkerVersionInfo {
18 public:
19 struct CONTENT_EXPORT 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;
29 ServiceWorkerVersionInfo();
30 ServiceWorkerVersionInfo(ServiceWorkerVersion::RunningStatus running_status,
31 ServiceWorkerVersion::Status status,
32 const GURL& script_url,
33 int64 registration_id,
34 int64 version_id,
35 int process_id,
36 int thread_id,
37 int devtools_agent_route_id);
38 ~ServiceWorkerVersionInfo();
40 ServiceWorkerVersion::RunningStatus running_status;
41 ServiceWorkerVersion::Status status;
42 GURL script_url;
43 int64 registration_id;
44 int64 version_id;
45 int process_id;
46 int thread_id;
47 int devtools_agent_route_id;
48 base::Time script_response_time;
49 base::Time script_last_modified;
50 std::map<std::string, ClientInfo> clients;
53 struct CONTENT_EXPORT ServiceWorkerRegistrationInfo {
54 public:
55 enum DeleteFlag { IS_NOT_DELETED, IS_DELETED };
56 enum ForceUpdateOnPageLoad { IS_NOT_FORCED, IS_FORCED };
57 ServiceWorkerRegistrationInfo();
58 ServiceWorkerRegistrationInfo(const GURL& pattern,
59 int64 registration_id,
60 DeleteFlag delete_flag);
61 ServiceWorkerRegistrationInfo(
62 const GURL& pattern,
63 int64 registration_id,
64 DeleteFlag delete_flag,
65 ForceUpdateOnPageLoad force_update_on_page_load,
66 const ServiceWorkerVersionInfo& active_version,
67 const ServiceWorkerVersionInfo& waiting_version,
68 const ServiceWorkerVersionInfo& installing_version,
69 int64_t active_version_total_size_bytes);
70 ~ServiceWorkerRegistrationInfo();
72 GURL pattern;
73 int64 registration_id;
74 DeleteFlag delete_flag;
75 ForceUpdateOnPageLoad force_update_on_page_load;
76 ServiceWorkerVersionInfo active_version;
77 ServiceWorkerVersionInfo waiting_version;
78 ServiceWorkerVersionInfo installing_version;
80 int64_t stored_version_size_bytes;
83 } // namespace content
85 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_