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

Unified Diff: content/child/service_worker/web_service_worker_registration_impl.h

Issue 516873002: ServiceWorker: Queue tasks until the registration proxy becomes ready (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile errors Created 6 years, 4 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
« no previous file with comments | « no previous file | content/child/service_worker/web_service_worker_registration_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/service_worker/web_service_worker_registration_impl.h
diff --git a/content/child/service_worker/web_service_worker_registration_impl.h b/content/child/service_worker/web_service_worker_registration_impl.h
index 9a72c11db485997f39b8bfd36274ee94a2dd6b88..e143a5cde948a00a722ad5b64dae9f113bb40d80 100644
--- a/content/child/service_worker/web_service_worker_registration_impl.h
+++ b/content/child/service_worker/web_service_worker_registration_impl.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_
#define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_
+#include <vector>
+
#include "base/compiler_specific.h"
#include "third_party/WebKit/public/platform/WebServiceWorkerRegistration.h"
@@ -38,9 +40,28 @@ class WebServiceWorkerRegistrationImpl
virtual blink::WebURL scope() const;
private:
+ enum QueuedTaskType {
+ INSTALLING,
+ WAITING,
+ ACTIVE,
+ UPDATE_FOUND,
+ };
+
+ struct QueuedTask {
+ QueuedTask(QueuedTaskType type,
+ blink::WebServiceWorker* worker);
+ QueuedTaskType type;
+ blink::WebServiceWorker* worker;
+ };
+
+ void RunQueuedTasks();
+ void ClearQueuedTasks();
+
scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref_;
blink::WebServiceWorkerRegistrationProxy* proxy_;
+ std::vector<QueuedTask> queued_tasks_;
+
DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl);
};
« no previous file with comments | « no previous file | content/child/service_worker/web_service_worker_registration_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698