| 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 b4d49b23383bf4d6756f0f8e39192c45a494d473..52d1e42ac4a8b096ab8c83be6086a347deb2a29b 100644
|
| --- a/content/common/service_worker/service_worker_types.h
|
| +++ b/content/common/service_worker/service_worker_types.h
|
| @@ -13,6 +13,7 @@
|
| #include "base/strings/string_util.h"
|
| #include "base/time/time.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"
|
| @@ -181,6 +182,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;
|
| @@ -230,6 +236,18 @@ struct ServiceWorkerClientQueryOptions {
|
| bool include_uncontrolled;
|
| };
|
|
|
| +struct ExtendableMessageEventSource {
|
| + ExtendableMessageEventSource();
|
| + explicit ExtendableMessageEventSource(
|
| + const ServiceWorkerClientInfo& client_info);
|
| + explicit ExtendableMessageEventSource(
|
| + const ServiceWorkerObjectInfo& service_worker_info);
|
| +
|
| + // Exactly one of these infos should be valid.
|
| + ServiceWorkerClientInfo client_info;
|
| + ServiceWorkerObjectInfo service_worker_info;
|
| +};
|
| +
|
| } // namespace content
|
|
|
| #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_
|
|
|