Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: content/browser/service_worker/service_worker_info.h

Issue 2917643002: PlzNavigate: Fix ServiceWorkerHandler not finding WebContents. (Closed)
Patch Set: Shorter comment. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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;
36 // |web_contents_getter| is only set for PlzNavigate.
37 base::Callback<WebContents*(void)> web_contents_getter;
31 ServiceWorkerProviderType type; 38 ServiceWorkerProviderType type;
32 }; 39 };
33 40
34 ServiceWorkerVersionInfo(); 41 ServiceWorkerVersionInfo();
35 ServiceWorkerVersionInfo( 42 ServiceWorkerVersionInfo(
36 EmbeddedWorkerStatus running_status, 43 EmbeddedWorkerStatus running_status,
37 ServiceWorkerVersion::Status status, 44 ServiceWorkerVersion::Status status,
38 ServiceWorkerVersion::FetchHandlerExistence fetch_handler_existence, 45 ServiceWorkerVersion::FetchHandlerExistence fetch_handler_existence,
39 const GURL& script_url, 46 const GURL& script_url,
40 int64_t registration_id, 47 int64_t registration_id,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 ServiceWorkerVersionInfo active_version; 91 ServiceWorkerVersionInfo active_version;
85 ServiceWorkerVersionInfo waiting_version; 92 ServiceWorkerVersionInfo waiting_version;
86 ServiceWorkerVersionInfo installing_version; 93 ServiceWorkerVersionInfo installing_version;
87 94
88 int64_t stored_version_size_bytes; 95 int64_t stored_version_size_bytes;
89 }; 96 };
90 97
91 } // namespace content 98 } // namespace content
92 99
93 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_ 100 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698