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/callback.h" | |
12 #include "base/time/time.h" | 13 #include "base/time/time.h" |
13 #include "content/browser/service_worker/service_worker_version.h" | 14 #include "content/browser/service_worker/service_worker_version.h" |
14 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
15 #include "content/common/service_worker/service_worker_types.h" | 16 #include "content/common/service_worker/service_worker_types.h" |
16 #include "url/gurl.h" | 17 #include "url/gurl.h" |
17 | 18 |
18 namespace content { | 19 namespace content { |
19 | 20 |
20 enum class EmbeddedWorkerStatus; | 21 enum class EmbeddedWorkerStatus; |
21 | 22 |
22 struct CONTENT_EXPORT ServiceWorkerVersionInfo { | 23 struct CONTENT_EXPORT ServiceWorkerVersionInfo { |
23 public: | 24 public: |
24 struct CONTENT_EXPORT ClientInfo { | 25 struct CONTENT_EXPORT ClientInfo { |
25 public: | 26 public: |
26 ClientInfo(); | 27 ClientInfo(); |
27 ClientInfo(int process_id, int route_id, ServiceWorkerProviderType type); | 28 ClientInfo(int process_id, |
29 int route_id, | |
30 const base::Callback<WebContents*(void)>& web_contents_getter, | |
31 ServiceWorkerProviderType type); | |
32 ClientInfo(const ClientInfo& other); | |
28 ~ClientInfo(); | 33 ~ClientInfo(); |
29 int process_id; | 34 int process_id; |
30 int route_id; | 35 int route_id; |
falken
2017/06/01 07:37:27
Does it make sense to say:
// |web_contents_gette
arthursonzogni
2017/06/01 08:14:08
Done.
| |
36 base::Callback<WebContents*(void)> web_contents_getter; | |
31 ServiceWorkerProviderType type; | 37 ServiceWorkerProviderType type; |
32 }; | 38 }; |
33 | 39 |
34 ServiceWorkerVersionInfo(); | 40 ServiceWorkerVersionInfo(); |
35 ServiceWorkerVersionInfo( | 41 ServiceWorkerVersionInfo( |
36 EmbeddedWorkerStatus running_status, | 42 EmbeddedWorkerStatus running_status, |
37 ServiceWorkerVersion::Status status, | 43 ServiceWorkerVersion::Status status, |
38 ServiceWorkerVersion::FetchHandlerExistence fetch_handler_existence, | 44 ServiceWorkerVersion::FetchHandlerExistence fetch_handler_existence, |
39 const GURL& script_url, | 45 const GURL& script_url, |
40 int64_t registration_id, | 46 int64_t registration_id, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 ServiceWorkerVersionInfo active_version; | 90 ServiceWorkerVersionInfo active_version; |
85 ServiceWorkerVersionInfo waiting_version; | 91 ServiceWorkerVersionInfo waiting_version; |
86 ServiceWorkerVersionInfo installing_version; | 92 ServiceWorkerVersionInfo installing_version; |
87 | 93 |
88 int64_t stored_version_size_bytes; | 94 int64_t stored_version_size_bytes; |
89 }; | 95 }; |
90 | 96 |
91 } // namespace content | 97 } // namespace content |
92 | 98 |
93 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_ | 99 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_ |
OLD | NEW |