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> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "content/common/background_sync_service.mojom.h" | |
15 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
16 #include "mojo/public/cpp/bindings/strong_binding.h" | 15 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 16 #include "third_party/WebKit/public/platform/modules/background_sync/background_
sync.mojom.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 class CONTENT_EXPORT BackgroundSyncClientImpl | 20 class CONTENT_EXPORT BackgroundSyncClientImpl |
21 : public NON_EXPORTED_BASE(mojom::BackgroundSyncServiceClient) { | 21 : public NON_EXPORTED_BASE(blink::mojom::BackgroundSyncServiceClient) { |
22 public: | 22 public: |
23 static void Create( | 23 static void Create(mojo::InterfaceRequest< |
24 mojo::InterfaceRequest<mojom::BackgroundSyncServiceClient> request); | 24 blink::mojom::BackgroundSyncServiceClient> request); |
25 | 25 |
26 ~BackgroundSyncClientImpl() override; | 26 ~BackgroundSyncClientImpl() override; |
27 | 27 |
28 private: | 28 private: |
29 using SyncCallback = mojo::Callback<void(mojom::ServiceWorkerEventStatus)>; | 29 using SyncCallback = |
| 30 mojo::Callback<void(blink::mojom::ServiceWorkerEventStatus)>; |
30 explicit BackgroundSyncClientImpl( | 31 explicit BackgroundSyncClientImpl( |
31 mojo::InterfaceRequest<mojom::BackgroundSyncServiceClient> request); | 32 mojo::InterfaceRequest<blink::mojom::BackgroundSyncServiceClient> |
| 33 request); |
32 | 34 |
33 // BackgroundSyncServiceClient methods: | 35 // BackgroundSyncServiceClient methods: |
34 void Sync(const mojo::String& tag, | 36 void Sync(const mojo::String& tag, |
35 content::mojom::BackgroundSyncEventLastChance last_chance, | 37 blink::mojom::BackgroundSyncEventLastChance last_chance, |
36 const SyncCallback& callback) override; | 38 const SyncCallback& callback) override; |
37 | 39 |
38 mojo::StrongBinding<mojom::BackgroundSyncServiceClient> binding_; | 40 mojo::StrongBinding<blink::mojom::BackgroundSyncServiceClient> binding_; |
39 | 41 |
40 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncClientImpl); | 42 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncClientImpl); |
41 }; | 43 }; |
42 | 44 |
43 } // namespace content | 45 } // namespace content |
44 | 46 |
45 #endif // CONTENT_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_ | 47 #endif // CONTENT_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_ |
OLD | NEW |