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

Side by Side Diff: content/child/background_sync/background_sync_provider.h

Issue 1344843003: [BackgroundSync] Add browser side support for SyncRegistration.done (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ncn_max
Patch Set: Address comments from PS7 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
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 CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_ 5 #ifndef CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_
6 #define CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_ 6 #define CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void getRegistrations( 50 void getRegistrations(
51 blink::WebSyncRegistration::Periodicity periodicity, 51 blink::WebSyncRegistration::Periodicity periodicity,
52 blink::WebServiceWorkerRegistration* service_worker_registration, 52 blink::WebServiceWorkerRegistration* service_worker_registration,
53 blink::WebSyncGetRegistrationsCallbacks* callbacks) override; 53 blink::WebSyncGetRegistrationsCallbacks* callbacks) override;
54 void getPermissionStatus( 54 void getPermissionStatus(
55 blink::WebSyncRegistration::Periodicity periodicity, 55 blink::WebSyncRegistration::Periodicity periodicity,
56 blink::WebServiceWorkerRegistration* service_worker_registration, 56 blink::WebServiceWorkerRegistration* service_worker_registration,
57 blink::WebSyncGetPermissionStatusCallbacks* callbacks) override; 57 blink::WebSyncGetPermissionStatusCallbacks* callbacks) override;
58 // TODO(jkarlin): Rename to releaseRegistrationHandle. 58 // TODO(jkarlin): Rename to releaseRegistrationHandle.
59 void releaseRegistration(int64_t handle_id) override; 59 void releaseRegistration(int64_t handle_id) override;
60 void notifyWhenDone(
61 int64_t handle_id,
62 blink::WebSyncNotifyWhenDoneCallbacks* callbacks) override;
60 63
61 void DuplicateRegistrationHandle( 64 void DuplicateRegistrationHandle(
62 int handle_id, 65 int handle_id,
63 const BackgroundSyncService::DuplicateRegistrationHandleCallback& 66 const BackgroundSyncService::DuplicateRegistrationHandleCallback&
64 callback); 67 callback);
65 68
66 private: 69 private:
67 // Callback handlers 70 // Callback handlers
68 void RegisterCallback( 71 void RegisterCallback(
69 scoped_ptr<blink::WebSyncRegistrationCallbacks> callbacks, 72 scoped_ptr<blink::WebSyncRegistrationCallbacks> callbacks,
70 BackgroundSyncError error, 73 BackgroundSyncError error,
71 const SyncRegistrationPtr& options); 74 const SyncRegistrationPtr& options);
72 void UnregisterCallback( 75 void UnregisterCallback(
73 scoped_ptr<blink::WebSyncUnregistrationCallbacks> callbacks, 76 scoped_ptr<blink::WebSyncUnregistrationCallbacks> callbacks,
74 BackgroundSyncError error); 77 BackgroundSyncError error);
75 void GetRegistrationCallback( 78 void GetRegistrationCallback(
76 scoped_ptr<blink::WebSyncRegistrationCallbacks> callbacks, 79 scoped_ptr<blink::WebSyncRegistrationCallbacks> callbacks,
77 BackgroundSyncError error, 80 BackgroundSyncError error,
78 const SyncRegistrationPtr& options); 81 const SyncRegistrationPtr& options);
79 void GetRegistrationsCallback( 82 void GetRegistrationsCallback(
80 scoped_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacks, 83 scoped_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacks,
81 BackgroundSyncError error, 84 BackgroundSyncError error,
82 const mojo::Array<SyncRegistrationPtr>& registrations); 85 const mojo::Array<SyncRegistrationPtr>& registrations);
83 void GetPermissionStatusCallback( 86 void GetPermissionStatusCallback(
84 scoped_ptr<blink::WebSyncGetPermissionStatusCallbacks> callbacks, 87 scoped_ptr<blink::WebSyncGetPermissionStatusCallbacks> callbacks,
85 BackgroundSyncError error, 88 BackgroundSyncError error,
86 PermissionStatus status); 89 PermissionStatus status);
90 void NotifyWhenDoneCallback(
91 scoped_ptr<blink::WebSyncNotifyWhenDoneCallbacks> callbacks,
92 BackgroundSyncError error,
93 BackgroundSyncState state);
87 94
88 // Helper method that returns an initialized BackgroundSyncServicePtr. 95 // Helper method that returns an initialized BackgroundSyncServicePtr.
89 BackgroundSyncServicePtr& GetBackgroundSyncServicePtr(); 96 BackgroundSyncServicePtr& GetBackgroundSyncServicePtr();
90 97
91 ServiceRegistry* service_registry_; 98 ServiceRegistry* service_registry_;
92 BackgroundSyncServicePtr background_sync_service_; 99 BackgroundSyncServicePtr background_sync_service_;
93 100
94 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncProvider); 101 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncProvider);
95 }; 102 };
96 103
97 } // namespace content 104 } // namespace content
98 105
99 #endif // CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_ 106 #endif // CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698