Index: content/common/service_worker/service_worker_types.h |
diff --git a/content/common/service_worker/service_worker_types.h b/content/common/service_worker/service_worker_types.h |
index e332f1ca05ba7b514d88b0590f054c78019f5552..bde71fa6aade570ce692161c46881ec71bf4788b 100644 |
--- a/content/common/service_worker/service_worker_types.h |
+++ b/content/common/service_worker/service_worker_types.h |
@@ -12,6 +12,7 @@ |
#include "base/strings/string_util.h" |
#include "content/common/content_export.h" |
+#include "content/common/service_worker/service_worker_client_info.h" |
#include "content/public/common/referrer.h" |
#include "content/public/common/request_context_frame_type.h" |
#include "content/public/common/request_context_type.h" |
@@ -178,6 +179,11 @@ struct CONTENT_EXPORT ServiceWorkerResponse { |
// Represents initialization info for a WebServiceWorker object. |
struct CONTENT_EXPORT ServiceWorkerObjectInfo { |
ServiceWorkerObjectInfo(); |
+ |
+ // Returns whether the instance is valid. A valid instance has valid |
+ // |handle_id| and |version_id|. |
+ bool IsValid() const; |
+ |
int handle_id; |
GURL url; |
blink::WebServiceWorkerState state; |
@@ -227,6 +233,17 @@ struct ServiceWorkerClientQueryOptions { |
bool include_uncontrolled; |
}; |
+struct ExtendableMessageEventSource { |
+ ExtendableMessageEventSource(); |
+ explicit ExtendableMessageEventSource( |
+ const ServiceWorkerClientInfo& client_info); |
+ explicit ExtendableMessageEventSource( |
+ const ServiceWorkerObjectInfo& service_worker_info); |
+ |
+ ServiceWorkerClientInfo client_info; |
+ ServiceWorkerObjectInfo service_worker_info; |
+}; |
+ |
} // namespace content |
#endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_ |