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

Side by Side Diff: public/platform/modules/background_sync/WebSyncProvider.h

Issue 1309393003: [Background Sync] Allow sync manager access from uncontrolled clients (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing comment Created 5 years, 3 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
« no previous file with comments | « Source/modules/background_sync/SyncManager.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 WebSyncProvider_h 5 #ifndef WebSyncProvider_h
6 #define WebSyncProvider_h 6 #define WebSyncProvider_h
7 7
8 #include "public/platform/WebCallbacks.h" 8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/WebCommon.h" 9 #include "public/platform/WebCommon.h"
10 #include "public/platform/WebString.h" 10 #include "public/platform/WebString.h"
(...skipping 11 matching lines...) Expand all
22 using WebSyncUnregistrationCallbacks = WebCallbacks<bool*, WebSyncError*>; 22 using WebSyncUnregistrationCallbacks = WebCallbacks<bool*, WebSyncError*>;
23 using WebSyncGetRegistrationsCallbacks = WebCallbacks<WebVector<WebSyncRegistrat ion*>*, WebSyncError*>; 23 using WebSyncGetRegistrationsCallbacks = WebCallbacks<WebVector<WebSyncRegistrat ion*>*, WebSyncError*>;
24 using WebSyncGetPermissionStatusCallbacks = WebCallbacks<WebSyncPermissionStatus *, WebSyncError*>; 24 using WebSyncGetPermissionStatusCallbacks = WebCallbacks<WebSyncPermissionStatus *, WebSyncError*>;
25 25
26 class WebSyncProvider { 26 class WebSyncProvider {
27 public: 27 public:
28 virtual ~WebSyncProvider() { } 28 virtual ~WebSyncProvider() { }
29 29
30 // Takes ownership of the WebSyncRegistrationCallbacks. 30 // Takes ownership of the WebSyncRegistrationCallbacks.
31 // Does not take ownership of the WebServiceWorkerRegistration. 31 // Does not take ownership of the WebServiceWorkerRegistration.
32 virtual void registerBackgroundSync(const WebSyncRegistration*, WebServiceWo rkerRegistration*, WebSyncRegistrationCallbacks*) = 0; 32 // TODO(iclelland): Remove the body of this method once it is implemented in all subclasses.
33 virtual void registerBackgroundSync(const WebSyncRegistration* options, WebS erviceWorkerRegistration* serviceWorkerRegistration, bool requestedFromServiceWo rker, WebSyncRegistrationCallbacks* callbacks)
34 {
35 registerBackgroundSync(options, serviceWorkerRegistration, callbacks);
36 }
37
38 // TODO(iclelland): Remove this deprecated method once the browser implement s the 4-argument version.
39 virtual void registerBackgroundSync(const WebSyncRegistration*, WebServiceWo rkerRegistration*, WebSyncRegistrationCallbacks*) { }
33 40
34 // Takes ownership of the WebSyncUnregistrationCallbacks. 41 // Takes ownership of the WebSyncUnregistrationCallbacks.
35 // Does not take ownership of the WebServiceWorkerRegistration. 42 // Does not take ownership of the WebServiceWorkerRegistration.
36 virtual void unregisterBackgroundSync(blink::WebSyncRegistration::Periodicit y, int64_t, const WebString&, WebServiceWorkerRegistration*, WebSyncUnregistrati onCallbacks*) = 0; 43 virtual void unregisterBackgroundSync(blink::WebSyncRegistration::Periodicit y, int64_t, const WebString&, WebServiceWorkerRegistration*, WebSyncUnregistrati onCallbacks*) = 0;
37 44
38 // Takes ownership of the WebSyncRegistrationCallbacks. 45 // Takes ownership of the WebSyncRegistrationCallbacks.
39 // Does not take ownership of the WebServiceWorkerRegistration. 46 // Does not take ownership of the WebServiceWorkerRegistration.
40 virtual void getRegistration(blink::WebSyncRegistration::Periodicity, const WebString&, WebServiceWorkerRegistration*, WebSyncRegistrationCallbacks*) = 0; 47 virtual void getRegistration(blink::WebSyncRegistration::Periodicity, const WebString&, WebServiceWorkerRegistration*, WebSyncRegistrationCallbacks*) = 0;
41 48
42 // Takes ownership of the WebSyncGetRegistrationsCallbacks. 49 // Takes ownership of the WebSyncGetRegistrationsCallbacks.
(...skipping 22 matching lines...) Expand all
65 virtual void releaseRegistration(int64_t syncId) 72 virtual void releaseRegistration(int64_t syncId)
66 { 73 {
67 // TODO(jkarlin): After landing both legs of the releaseRegistration CLs , make this a pure virtual function. 74 // TODO(jkarlin): After landing both legs of the releaseRegistration CLs , make this a pure virtual function.
68 return; 75 return;
69 } 76 }
70 }; 77 };
71 78
72 } // namespace blink 79 } // namespace blink
73 80
74 #endif // WebSyncProvider_h 81 #endif // WebSyncProvider_h
OLDNEW
« no previous file with comments | « Source/modules/background_sync/SyncManager.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698