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

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

Issue 1270513002: Service Worker: Make ServiceWorkerRegistration.update() return a promise. (Chromium 2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass a raw ptr to callback's onError instead of a scoped_ptr. Created 5 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 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 virtual void update(blink::WebServiceWorkerProvider* provider,
43 WebServiceWorkerUpdateCallbacks* callbacks);
43 virtual void unregister(blink::WebServiceWorkerProvider* provider, 44 virtual void unregister(blink::WebServiceWorkerProvider* provider,
44 WebServiceWorkerUnregistrationCallbacks* callbacks); 45 WebServiceWorkerUnregistrationCallbacks* callbacks);
45 46
46 int64 registration_id() const; 47 int64 registration_id() const;
47 48
48 private: 49 private:
49 enum QueuedTaskType { 50 enum QueuedTaskType {
50 INSTALLING, 51 INSTALLING,
51 WAITING, 52 WAITING,
52 ACTIVE, 53 ACTIVE,
(...skipping 14 matching lines...) Expand all
67 blink::WebServiceWorkerRegistrationProxy* proxy_; 68 blink::WebServiceWorkerRegistrationProxy* proxy_;
68 69
69 std::vector<QueuedTask> queued_tasks_; 70 std::vector<QueuedTask> queued_tasks_;
70 71
71 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl); 72 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl);
72 }; 73 };
73 74
74 } // namespace content 75 } // namespace content
75 76
76 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ 77 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698