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

Side by Side Diff: content/child/service_worker/web_service_worker_registration_impl.h

Issue 1175823002: ServiceWorker: Implement ServiceWorkerRegistration.update() (2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address kinuko@'s comments Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ 6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 21 matching lines...) Expand all
32 void SetInstalling(blink::WebServiceWorker* service_worker); 32 void SetInstalling(blink::WebServiceWorker* service_worker);
33 void SetWaiting(blink::WebServiceWorker* service_worker); 33 void SetWaiting(blink::WebServiceWorker* service_worker);
34 void SetActive(blink::WebServiceWorker* service_worker); 34 void SetActive(blink::WebServiceWorker* service_worker);
35 35
36 void OnUpdateFound(); 36 void OnUpdateFound();
37 37
38 // blink::WebServiceWorkerRegistration overrides. 38 // blink::WebServiceWorkerRegistration overrides.
39 virtual void setProxy(blink::WebServiceWorkerRegistrationProxy* proxy); 39 virtual void setProxy(blink::WebServiceWorkerRegistrationProxy* proxy);
40 virtual blink::WebServiceWorkerRegistrationProxy* proxy(); 40 virtual blink::WebServiceWorkerRegistrationProxy* proxy();
41 virtual blink::WebURL scope() const; 41 virtual blink::WebURL scope() const;
42 virtual void update(blink::WebServiceWorkerProvider* provider);
42 43
43 int64 registration_id() const; 44 int64 registration_id() const;
44 45
45 private: 46 private:
46 enum QueuedTaskType { 47 enum QueuedTaskType {
47 INSTALLING, 48 INSTALLING,
48 WAITING, 49 WAITING,
49 ACTIVE, 50 ACTIVE,
50 UPDATE_FOUND, 51 UPDATE_FOUND,
51 }; 52 };
52 53
53 struct QueuedTask { 54 struct QueuedTask {
54 QueuedTask(QueuedTaskType type, 55 QueuedTask(QueuedTaskType type,
55 blink::WebServiceWorker* worker); 56 blink::WebServiceWorker* worker);
56 QueuedTaskType type; 57 QueuedTaskType type;
57 blink::WebServiceWorker* worker; 58 blink::WebServiceWorker* worker;
58 }; 59 };
59 60
60 void RunQueuedTasks(); 61 void RunQueuedTasks();
61 void ClearQueuedTasks(); 62 void ClearQueuedTasks();
62 63
63 scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref_; 64 scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref_;
michaeln 2015/06/11 21:40:48 Given non-hacked renderers, it should be safe to a
nhiroki 2015/06/12 08:50:57 Acknowledged.
64 blink::WebServiceWorkerRegistrationProxy* proxy_; 65 blink::WebServiceWorkerRegistrationProxy* proxy_;
65 66
66 std::vector<QueuedTask> queued_tasks_; 67 std::vector<QueuedTask> queued_tasks_;
67 68
68 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl); 69 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl);
69 }; 70 };
70 71
71 } // namespace content 72 } // namespace content
72 73
73 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ 74 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698