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

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

Issue 2771823002: Implement updateViaCache flag and no-cache by default for main service worker scripts
Patch Set: fix IPC Created 3 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 25 matching lines...) Expand all
36 : NON_EXPORTED_BASE(public blink::WebServiceWorkerRegistration), 36 : NON_EXPORTED_BASE(public blink::WebServiceWorkerRegistration),
37 public base::RefCounted<WebServiceWorkerRegistrationImpl> { 37 public base::RefCounted<WebServiceWorkerRegistrationImpl> {
38 public: 38 public:
39 explicit WebServiceWorkerRegistrationImpl( 39 explicit WebServiceWorkerRegistrationImpl(
40 std::unique_ptr<ServiceWorkerRegistrationHandleReference> handle_ref); 40 std::unique_ptr<ServiceWorkerRegistrationHandleReference> handle_ref);
41 41
42 void SetInstalling(const scoped_refptr<WebServiceWorkerImpl>& service_worker); 42 void SetInstalling(const scoped_refptr<WebServiceWorkerImpl>& service_worker);
43 void SetWaiting(const scoped_refptr<WebServiceWorkerImpl>& service_worker); 43 void SetWaiting(const scoped_refptr<WebServiceWorkerImpl>& service_worker);
44 void SetActive(const scoped_refptr<WebServiceWorkerImpl>& service_worker); 44 void SetActive(const scoped_refptr<WebServiceWorkerImpl>& service_worker);
45 45
46 void SetRegistrationHandleReference(
47 std::unique_ptr<ServiceWorkerRegistrationHandleReference> handle_ref);
48
46 void OnUpdateFound(); 49 void OnUpdateFound();
47 50
48 // blink::WebServiceWorkerRegistration overrides. 51 // blink::WebServiceWorkerRegistration overrides.
49 void SetProxy(blink::WebServiceWorkerRegistrationProxy* proxy) override; 52 void SetProxy(blink::WebServiceWorkerRegistrationProxy* proxy) override;
50 blink::WebServiceWorkerRegistrationProxy* Proxy() override; 53 blink::WebServiceWorkerRegistrationProxy* Proxy() override;
51 blink::WebURL Scope() const override; 54 blink::WebURL Scope() const override;
55 blink::WebServiceWorkerUpdateViaCache UpdateViaCache() const override;
52 void Update( 56 void Update(
53 blink::WebServiceWorkerProvider* provider, 57 blink::WebServiceWorkerProvider* provider,
54 std::unique_ptr<WebServiceWorkerUpdateCallbacks> callbacks) override; 58 std::unique_ptr<WebServiceWorkerUpdateCallbacks> callbacks) override;
55 void Unregister(blink::WebServiceWorkerProvider* provider, 59 void Unregister(blink::WebServiceWorkerProvider* provider,
56 std::unique_ptr<WebServiceWorkerUnregistrationCallbacks> 60 std::unique_ptr<WebServiceWorkerUnregistrationCallbacks>
57 callbacks) override; 61 callbacks) override;
58 void EnableNavigationPreload( 62 void EnableNavigationPreload(
59 bool enable, 63 bool enable,
60 blink::WebServiceWorkerProvider* provider, 64 blink::WebServiceWorkerProvider* provider,
61 std::unique_ptr<WebEnableNavigationPreloadCallbacks> callbacks) override; 65 std::unique_ptr<WebEnableNavigationPreloadCallbacks> callbacks) override;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 blink::WebServiceWorkerRegistrationProxy* proxy_; 108 blink::WebServiceWorkerRegistrationProxy* proxy_;
105 109
106 std::vector<QueuedTask> queued_tasks_; 110 std::vector<QueuedTask> queued_tasks_;
107 111
108 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl); 112 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl);
109 }; 113 };
110 114
111 } // namespace content 115 } // namespace content
112 116
113 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ 117 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698