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_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_ |
6 #define CONTENT_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_ | 6 #define CONTENT_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 13 matching lines...) Expand all Loading... |
24 mojo::InterfaceRequest<BackgroundSyncServiceClient> request); | 24 mojo::InterfaceRequest<BackgroundSyncServiceClient> request); |
25 | 25 |
26 ~BackgroundSyncClientImpl() override; | 26 ~BackgroundSyncClientImpl() override; |
27 | 27 |
28 private: | 28 private: |
29 using SyncCallback = mojo::Callback<void(ServiceWorkerEventStatus)>; | 29 using SyncCallback = mojo::Callback<void(ServiceWorkerEventStatus)>; |
30 explicit BackgroundSyncClientImpl( | 30 explicit BackgroundSyncClientImpl( |
31 mojo::InterfaceRequest<BackgroundSyncServiceClient> request); | 31 mojo::InterfaceRequest<BackgroundSyncServiceClient> request); |
32 | 32 |
33 // BackgroundSyncServiceClient methods: | 33 // BackgroundSyncServiceClient methods: |
34 void Sync(int64_t handle_id, | 34 void Sync(const mojo::String& tag, |
35 content::BackgroundSyncEventLastChance last_chance, | 35 content::BackgroundSyncEventLastChance last_chance, |
36 const SyncCallback& callback) override; | 36 const SyncCallback& callback) override; |
37 void SyncDidGetRegistration( | |
38 int64_t callback_id, | |
39 content::BackgroundSyncEventLastChance last_chance, | |
40 BackgroundSyncError error, | |
41 SyncRegistrationPtr registration); | |
42 | 37 |
43 mojo::StrongBinding<BackgroundSyncServiceClient> binding_; | 38 mojo::StrongBinding<BackgroundSyncServiceClient> binding_; |
44 | 39 |
45 int64_t callback_seq_num_; | |
46 std::map<int64_t, SyncCallback> sync_callbacks_; | |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncClientImpl); | 40 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncClientImpl); |
49 }; | 41 }; |
50 | 42 |
51 } // namespace content | 43 } // namespace content |
52 | 44 |
53 #endif // CONTENT_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_ | 45 #endif // CONTENT_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_ |
OLD | NEW |