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

Unified Diff: content/common/service_worker/service_worker_types.cc

Issue 1701843002: ServiceWorker: Implement 'source' and 'origin' attributes of ExtendableMessageEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_focus_into_utils
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/common/service_worker/service_worker_types.cc
diff --git a/content/common/service_worker/service_worker_types.cc b/content/common/service_worker/service_worker_types.cc
index 56437d022de54b9d57ce6a5baab439735a415114..76f0d6052dbcc404bb63b91d47bcd566f0c66b8a 100644
--- a/content/common/service_worker/service_worker_types.cc
+++ b/content/common/service_worker/service_worker_types.cc
@@ -92,6 +92,11 @@ ServiceWorkerObjectInfo::ServiceWorkerObjectInfo()
state(blink::WebServiceWorkerStateUnknown),
version_id(kInvalidServiceWorkerVersionId) {}
+bool ServiceWorkerObjectInfo::IsValid() const {
+ return handle_id != kInvalidServiceWorkerHandleId &&
+ version_id != kInvalidServiceWorkerVersionId;
+}
+
ServiceWorkerRegistrationObjectInfo::ServiceWorkerRegistrationObjectInfo()
: handle_id(kInvalidServiceWorkerRegistrationHandleId),
registration_id(kInvalidServiceWorkerRegistrationId) {
@@ -102,4 +107,14 @@ ServiceWorkerClientQueryOptions::ServiceWorkerClientQueryOptions()
include_uncontrolled(false) {
}
+ExtendableMessageEventSource::ExtendableMessageEventSource() {}
+
+ExtendableMessageEventSource::ExtendableMessageEventSource(
+ const ServiceWorkerClientInfo& client_info)
+ : client_info(client_info) {}
+
+ExtendableMessageEventSource::ExtendableMessageEventSource(
+ const ServiceWorkerObjectInfo& service_worker_info)
+ : service_worker_info(service_worker_info) {}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698