| OLD | NEW |
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 blink::WebSyncRegistrationCallbacks* callbacks); | 45 blink::WebSyncRegistrationCallbacks* callbacks); |
| 46 void getRegistrations( | 46 void getRegistrations( |
| 47 blink::WebSyncRegistration::Periodicity periodicity, | 47 blink::WebSyncRegistration::Periodicity periodicity, |
| 48 blink::WebServiceWorkerRegistration* service_worker_registration, | 48 blink::WebServiceWorkerRegistration* service_worker_registration, |
| 49 blink::WebSyncGetRegistrationsCallbacks* callbacks); | 49 blink::WebSyncGetRegistrationsCallbacks* callbacks); |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 // Callback handlers | 52 // Callback handlers |
| 53 void RegisterCallback( | 53 void RegisterCallback( |
| 54 scoped_ptr<blink::WebSyncRegistrationCallbacks> callbacks, | 54 scoped_ptr<blink::WebSyncRegistrationCallbacks> callbacks, |
| 55 BackgroundSyncError error, |
| 55 const SyncRegistrationPtr& options); | 56 const SyncRegistrationPtr& options); |
| 56 void UnregisterCallback( | 57 void UnregisterCallback( |
| 57 scoped_ptr<blink::WebSyncUnregistrationCallbacks> callbacks, | 58 scoped_ptr<blink::WebSyncUnregistrationCallbacks> callbacks, |
| 58 bool success); | 59 BackgroundSyncError error); |
| 59 void GetRegistrationsCallback( | 60 void GetRegistrationsCallback( |
| 60 scoped_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacks, | 61 scoped_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacks, |
| 62 BackgroundSyncError error, |
| 61 const mojo::Array<SyncRegistrationPtr>& registrations); | 63 const mojo::Array<SyncRegistrationPtr>& registrations); |
| 62 | 64 |
| 63 // Helper method that returns an initialized BackgroundSyncServicePtr. | 65 // Helper method that returns an initialized BackgroundSyncServicePtr. |
| 64 BackgroundSyncServicePtr& GetBackgroundSyncServicePtr(); | 66 BackgroundSyncServicePtr& GetBackgroundSyncServicePtr(); |
| 65 | 67 |
| 66 ServiceRegistry* service_registry_; | 68 ServiceRegistry* service_registry_; |
| 67 BackgroundSyncServicePtr background_sync_service_; | 69 BackgroundSyncServicePtr background_sync_service_; |
| 68 | 70 |
| 69 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncProvider); | 71 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncProvider); |
| 70 }; | 72 }; |
| 71 | 73 |
| 72 } // namespace content | 74 } // namespace content |
| 73 | 75 |
| 74 #endif // CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_ | 76 #endif // CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_H_ |
| OLD | NEW |