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

Side by Side Diff: third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h

Issue 2771823002: Implement updateViaCache flag and no-cache by default for main service worker scripts
Patch Set: fix tests Created 3 years, 8 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 WebServiceWorkerRegistration_h 5 #ifndef WebServiceWorkerRegistration_h
6 #define WebServiceWorkerRegistration_h 6 #define WebServiceWorkerRegistration_h
7 7
8 #include "public/platform/WebCallbacks.h" 8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/WebURL.h" 9 #include "public/platform/WebURL.h"
10 #include "public/platform/modules/serviceworker/WebServiceWorkerError.h" 10 #include "public/platform/modules/serviceworker/WebServiceWorkerError.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 public: 44 public:
45 virtual ~Handle() {} 45 virtual ~Handle() {}
46 virtual WebServiceWorkerRegistration* registration() { return nullptr; } 46 virtual WebServiceWorkerRegistration* registration() { return nullptr; }
47 }; 47 };
48 48
49 virtual void setProxy(WebServiceWorkerRegistrationProxy*) {} 49 virtual void setProxy(WebServiceWorkerRegistrationProxy*) {}
50 virtual WebServiceWorkerRegistrationProxy* proxy() { return nullptr; } 50 virtual WebServiceWorkerRegistrationProxy* proxy() { return nullptr; }
51 virtual void proxyStopped() {} 51 virtual void proxyStopped() {}
52 52
53 virtual WebURL scope() const { return WebURL(); } 53 virtual WebURL scope() const { return WebURL(); }
54 virtual bool useCache() const { return false; }
54 virtual int64_t registrationId() const = 0; 55 virtual int64_t registrationId() const = 0;
55 virtual void update(WebServiceWorkerProvider*, 56 virtual void update(WebServiceWorkerProvider*,
56 std::unique_ptr<WebServiceWorkerUpdateCallbacks>) {} 57 std::unique_ptr<WebServiceWorkerUpdateCallbacks>) {}
57 virtual void unregister( 58 virtual void unregister(
58 WebServiceWorkerProvider*, 59 WebServiceWorkerProvider*,
59 std::unique_ptr<WebServiceWorkerUnregistrationCallbacks>) {} 60 std::unique_ptr<WebServiceWorkerUnregistrationCallbacks>) {}
60 61
61 virtual void enableNavigationPreload( 62 virtual void enableNavigationPreload(
62 bool enable, 63 bool enable,
63 WebServiceWorkerProvider*, 64 WebServiceWorkerProvider*,
64 std::unique_ptr<WebEnableNavigationPreloadCallbacks>) {} 65 std::unique_ptr<WebEnableNavigationPreloadCallbacks>) {}
65 virtual void getNavigationPreloadState( 66 virtual void getNavigationPreloadState(
66 WebServiceWorkerProvider*, 67 WebServiceWorkerProvider*,
67 std::unique_ptr<WebGetNavigationPreloadStateCallbacks>) {} 68 std::unique_ptr<WebGetNavigationPreloadStateCallbacks>) {}
68 virtual void setNavigationPreloadHeader( 69 virtual void setNavigationPreloadHeader(
69 const WebString& value, 70 const WebString& value,
70 WebServiceWorkerProvider*, 71 WebServiceWorkerProvider*,
71 std::unique_ptr<WebSetNavigationPreloadHeaderCallbacks>) {} 72 std::unique_ptr<WebSetNavigationPreloadHeaderCallbacks>) {}
72 }; 73 };
73 74
74 } // namespace blink 75 } // namespace blink
75 76
76 #endif // WebServiceWorkerRegistration_h 77 #endif // WebServiceWorkerRegistration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698