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

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: clean up tests Created 4 years, 9 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 93af1749ccd7074afe0e332f9495fadbdeb8e1de..c3f9ec6df91ad2e9ed1ebd761effd4289735d4c1 100644
--- a/content/common/service_worker/service_worker_types.cc
+++ b/content/common/service_worker/service_worker_types.cc
@@ -94,6 +94,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) {
@@ -104,4 +109,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
« no previous file with comments | « content/common/service_worker/service_worker_types.h ('k') | content/renderer/service_worker/service_worker_context_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698